Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import express from '@feathersjs/express'
import socketio from '@feathersjs/socketio'
import authentication from '@feathersjs/authentication'
import local from '@feathersjs/authentication-local'
import session from 'express-session'
import cors from 'cors'
import services from './api';
import routes from './routes'
import Html from './pages/Layout.jsx'
const api = feathers()
const app = express(api)
const router = express.Router()
const renderer = ssr({
debug: true,
routes,
Html
})
const sessionMiddleware = session({
secret: process.env.HTTP_SESSION_SECRET,
resave: false,
saveUninitialized: true,
cookie: {secure: process.env.HTTP_SESSION_SECURE === 'yes'},
})
const corsMiddleware = cors({
origin: '*',
})