|
|
|
@ -4,6 +4,7 @@ import cors from 'cors'
|
|
|
|
import bodyParser from 'body-parser'
|
|
|
|
import bodyParser from 'body-parser'
|
|
|
|
import api from './api'
|
|
|
|
import api from './api'
|
|
|
|
import config from './config'
|
|
|
|
import config from './config'
|
|
|
|
|
|
|
|
import slao from 'slao'
|
|
|
|
import { ErrorHandlerService, EsProxy, MongoProxy, StorageService } from './services'
|
|
|
|
import { ErrorHandlerService, EsProxy, MongoProxy, StorageService } from './services'
|
|
|
|
|
|
|
|
|
|
|
|
const createLogRecord = (type, message) => ({
|
|
|
|
const createLogRecord = (type, message) => ({
|
|
|
|
@ -16,6 +17,8 @@ let app = express()
|
|
|
|
|
|
|
|
|
|
|
|
app.server = http.createServer(app)
|
|
|
|
app.server = http.createServer(app)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.use(slao.init({ appName: 'ambar-serviceapi' }))
|
|
|
|
|
|
|
|
|
|
|
|
app.use(cors({
|
|
|
|
app.use(cors({
|
|
|
|
credentials: true,
|
|
|
|
credentials: true,
|
|
|
|
origin: true
|
|
|
|
origin: true
|
|
|
|
|