Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var http = require('http')
, path = require('path')
, express = require('express')
, gzippo = require('gzippo')
, derby = require('derby')
, auth = require('derby-auth')
, app = require('../app')
, serverError = require('./serverError')
// SERVER CONFIGURATION //
var expressApp = express()
, server = module.exports = http.createServer(expressApp)
derby.use(derby.logPlugin)
derby.use(require('racer-db-mongo')); // This line is new
var store = derby.createStore({
listen: server,
db: {type: 'Mongo', uri: process.env.MONGOHQ_URL || 'mongodb://localhost/snippets'}
})
//Authentication
auth.store(store);
var options, strategies;
strategies = {
facebook: {
strategy: require("passport-facebook").Strategy,
conf: {
clientID: process.env.FACEBOOK_KEY,