Merge branch 'main' of git.odit.services:lfk/backend into main
This commit is contained in:
commit
21645be25c
110
package.json
110
package.json
@ -1,53 +1,61 @@
|
|||||||
{
|
{
|
||||||
"name": "@lfk/backend",
|
"name": "@lfk/backend",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "src/app.ts",
|
"main": "src/app.ts",
|
||||||
"repository": "https://git.odit.services/lfk/backend",
|
"repository": "https://git.odit.services/lfk/backend",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "ODIT.Services",
|
"name": "ODIT.Services",
|
||||||
"email": "info@odit.services",
|
"email": "info@odit.services",
|
||||||
"url": "https://odit.services"
|
"url": "https://odit.services"
|
||||||
},
|
},
|
||||||
"contributors": [
|
"contributors": [
|
||||||
{
|
{
|
||||||
"name": "Philipp Dormann",
|
"name": "Philipp Dormann",
|
||||||
"email": "philipp@philippdormann.de",
|
"email": "philipp@philippdormann.de",
|
||||||
"url": "https://philippdormann.de"
|
"url": "https://philippdormann.de"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Nicolai Ort",
|
"name": "Nicolai Ort",
|
||||||
"email": "info@nicolai-ort.com",
|
"email": "info@nicolai-ort.com",
|
||||||
"url": "https://nicolai-ort.com"
|
"url": "https://nicolai-ort.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "CC-BY-NC-SA-4.0",
|
"license": "CC-BY-NC-SA-4.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"body-parser": "^1.19.0",
|
"body-parser": "^1.19.0",
|
||||||
"consola": "^2.15.0",
|
"consola": "^2.15.0",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"helmet": "^4.2.0",
|
"helmet": "^4.2.0",
|
||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^8.5.1",
|
||||||
"mysql": "^2.18.1",
|
"mysql": "^2.18.1",
|
||||||
"pg": "^8.5.1",
|
"pg": "^8.5.1",
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
"typeorm": "^0.2.29"
|
"typeorm": "^0.2.29"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@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",
|
||||||
"sqlite3": "^5.0.0",
|
"prettier": "^2.2.0",
|
||||||
"ts-node": "^9.0.0",
|
"pretty-quick": "^3.1.0",
|
||||||
"typescript": "^4.1.2"
|
"sqlite3": "^5.0.0",
|
||||||
},
|
"ts-node": "^9.0.0",
|
||||||
"scripts": {
|
"typescript": "^4.1.2"
|
||||||
"dev": "nodemon src/app.ts",
|
},
|
||||||
"build": "tsc"
|
"scripts": {
|
||||||
}
|
"dev": "nodemon src/app.ts",
|
||||||
|
"build": "tsc",
|
||||||
|
"format": "pretty-quick"
|
||||||
|
},
|
||||||
|
"husky": {
|
||||||
|
"hooks": {
|
||||||
|
"pre-commit": "pretty-quick --staged"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
31
src/app.ts
31
src/app.ts
@ -1,23 +1,20 @@
|
|||||||
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 { createConnection } from 'typeorm';
|
import "reflect-metadata";
|
||||||
import bodyparser from "body-parser";
|
import loaders from "./loaders/index";
|
||||||
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() {
|
||||||
await loaders(app);
|
let app = express();
|
||||||
app.listen(PORT, () => {
|
await loaders(app);
|
||||||
consola.success(`⚡️[server]: Server is running at http://localhost:${PORT}`);
|
app.listen(PORT, () => {
|
||||||
});
|
consola.success(
|
||||||
|
`⚡️[server]: Server is running at http://localhost:${PORT}`
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
main();
|
||||||
main()
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user