Compare commits
No commits in common. "db5b94e394a8f45f51e44885a63deccccdb7c156" and "cfbf1ff8211f7c8e1f5bfc9231c2187b3b9d8c31" have entirely different histories.
db5b94e394
...
cfbf1ff821
12
package.json
12
package.json
@ -37,25 +37,17 @@
|
|||||||
"@types/cors": "^2.8.8",
|
"@types/cors": "^2.8.8",
|
||||||
"@types/dotenv-safe": "^8.1.1",
|
"@types/dotenv-safe": "^8.1.1",
|
||||||
"@types/express": "^4.17.9",
|
"@types/express": "^4.17.9",
|
||||||
|
"@types/helmet": "^4.0.0",
|
||||||
"@types/jsonwebtoken": "^8.5.0",
|
"@types/jsonwebtoken": "^8.5.0",
|
||||||
"@types/node": "^14.14.9",
|
"@types/node": "^14.14.9",
|
||||||
"dotenv-safe": "^8.2.0",
|
"dotenv-safe": "^8.2.0",
|
||||||
"husky": "^4.3.0",
|
|
||||||
"nodemon": "^2.0.6",
|
"nodemon": "^2.0.6",
|
||||||
"prettier": "^2.2.0",
|
|
||||||
"pretty-quick": "^3.1.0",
|
|
||||||
"sqlite3": "^5.0.0",
|
"sqlite3": "^5.0.0",
|
||||||
"ts-node": "^9.0.0",
|
"ts-node": "^9.0.0",
|
||||||
"typescript": "^4.1.2"
|
"typescript": "^4.1.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nodemon src/app.ts",
|
"dev": "nodemon src/app.ts",
|
||||||
"build": "tsc",
|
"build": "tsc"
|
||||||
"format": "pretty-quick"
|
|
||||||
},
|
|
||||||
"husky": {
|
|
||||||
"hooks": {
|
|
||||||
"pre-commit": "pretty-quick --staged"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
25
src/app.ts
25
src/app.ts
@ -1,20 +1,23 @@
|
|||||||
import * as dotenvSafe from "dotenv-safe";
|
import * as dotenvSafe from 'dotenv-safe';
|
||||||
import express from "express";
|
import express from 'express';
|
||||||
import consola from "consola";
|
import consola from 'consola';
|
||||||
// import * as jwt from 'jsonwebtoken';
|
import * as jwt from 'jsonwebtoken';
|
||||||
import "reflect-metadata";
|
import { createConnection } from 'typeorm';
|
||||||
import loaders from "./loaders/index";
|
import bodyparser from "body-parser";
|
||||||
|
import 'reflect-metadata';
|
||||||
|
import routerMain from './routes/index';
|
||||||
|
// const loaders = require('./loaders');
|
||||||
|
import loaders from './loaders/index';
|
||||||
|
|
||||||
dotenvSafe.config();
|
dotenvSafe.config();
|
||||||
|
let app = express();
|
||||||
const PORT = process.env.APP_PORT || 4010;
|
const PORT = process.env.APP_PORT || 4010;
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
let app = express();
|
|
||||||
await loaders(app);
|
await loaders(app);
|
||||||
app.listen(PORT, () => {
|
app.listen(PORT, () => {
|
||||||
consola.success(
|
consola.success(`⚡️[server]: Server is running at http://localhost:${PORT}`);
|
||||||
`⚡️[server]: Server is running at http://localhost:${PORT}`
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
main();
|
|
||||||
|
main()
|
Loading…
x
Reference in New Issue
Block a user