succo ace

This commit is contained in:
matteo
2019-01-14 19:23:29 +01:00
parent ab13120448
commit 7d94fb34ca
12 changed files with 18878 additions and 217 deletions
+9
View File
@@ -1,14 +1,23 @@
const express = require('express');
const compression = require('compression')
const bodyParser = require('body-parser');
const low = require('lowdb');
const lodashId = require('lodash-id');
const FileAsync = require('lowdb/adapters/FileAsync');
const app = express(); // app is an instance of express
app.use(compression()); // enables gzip compression
app.use(bodyParser.urlencoded({ extended: false })) // parse application/x-www-form-urlencoded
app.use(bodyParser.json()) // parse application/json
app.use(express.static(__dirname + '/build')); // serve static build site
app.get('/a', (req, res) => {
res.send(process.env);
});
// Create database instance and start server
// const adapter = new FileAsync(__dirname + '/db.json');
low(new FileAsync(__dirname + '/db.json')) // production