Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var app = express();
// Specify the connection string for your mongodb database
// and the location to your Parse cloud code
var api = new ParseServer({
databaseURI: 'mongodb://localhost:27017/integration',
appId: 'integration',
masterKey: 'notsosecret',
serverURL: 'http://localhost:1337/parse', // Don't forget to change to https if needed
cloud: __dirname + '/cloud/main.js',
});
// Serve the Parse API on the /parse URL prefix
app.use('/parse', api);
const TestUtils = require('parse-server').TestUtils;
app.get('/clear', (req, res) => {
TestUtils.destroyAllDataPermanently().then(() => {
res.send('{}');
});
});
app.listen(1337, () => {
console.log('parse-server running on port 1337.');
});
},
facebook: {
appIds: "test"
},
twitter: {
consumer_key: "5QiVwxr8FQHbo5CMw46Z0jquF",
consumer_secret: "p05FDlIRAnOtqJtjIt0xcw390jCcjj56QMdE9B52iVgOEb7LuK",
},
},
verbose: false,
silent: true,
});
app.use('/parse', api);
const TestUtils = require('parse-server').TestUtils;
app.get('/clear', (req, res) => {
TestUtils.destroyAllDataPermanently().then(() => {
res.send('{}');
});
});
module.exports = {
app
};