first stable release

This commit is contained in:
Gianmarco Pettinato 2021-09-24 16:19:56 +02:00
parent 0bed9ddfb6
commit 4a46751505
3 changed files with 26 additions and 5 deletions

28
package-lock.json generated
View File

@ -11,6 +11,7 @@
"dependencies": { "dependencies": {
"axios": "^0.21.4", "axios": "^0.21.4",
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"cors": "^2.8.5",
"dayjs": "^1.10.7", "dayjs": "^1.10.7",
"dcc-utils": "^0.2.0", "dcc-utils": "^0.2.0",
"express": "^4.17.1", "express": "^4.17.1",
@ -4622,6 +4623,18 @@
"optional": true, "optional": true,
"peer": true "peer": true
}, },
"node_modules/cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"dependencies": {
"object-assign": "^4",
"vary": "^1"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/cose-js": { "node_modules/cose-js": {
"version": "0.6.0", "version": "0.6.0",
"resolved": "https://registry.npmjs.org/cose-js/-/cose-js-0.6.0.tgz", "resolved": "https://registry.npmjs.org/cose-js/-/cose-js-0.6.0.tgz",
@ -8585,8 +8598,6 @@
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"optional": true,
"peer": true,
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
} }
@ -15529,6 +15540,15 @@
"optional": true, "optional": true,
"peer": true "peer": true
}, },
"cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"requires": {
"object-assign": "^4",
"vary": "^1"
}
},
"cose-js": { "cose-js": {
"version": "0.6.0", "version": "0.6.0",
"resolved": "https://registry.npmjs.org/cose-js/-/cose-js-0.6.0.tgz", "resolved": "https://registry.npmjs.org/cose-js/-/cose-js-0.6.0.tgz",
@ -18737,9 +18757,7 @@
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
"optional": true,
"peer": true
}, },
"object-copy": { "object-copy": {
"version": "0.1.0", "version": "0.1.0",

View File

@ -11,6 +11,7 @@
"dependencies": { "dependencies": {
"axios": "^0.21.4", "axios": "^0.21.4",
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"cors": "^2.8.5",
"dayjs": "^1.10.7", "dayjs": "^1.10.7",
"dcc-utils": "^0.2.0", "dcc-utils": "^0.2.0",
"express": "^4.17.1", "express": "^4.17.1",

View File

@ -1,9 +1,11 @@
import { setupApis } from './api'; import { setupApis } from './api';
import express from 'express'; import express from 'express';
import cors from 'cors';
const app = express(); const app = express();
app.set('port', process.env.PORT || 3000); app.set('port', process.env.PORT || 3000);
app.use(cors());
app.use(express.json()); app.use(express.json());
app.use(express.urlencoded()); app.use(express.urlencoded());
setupApis(app); setupApis(app);