Commit eb4569a2 authored by Цой Данил's avatar Цой Данил 💬

Initial commit

parents
APP_PORT=8000
PG_HOST=localhost
MONGO_CLIENT_URL=mongodb://localhost/TsoyDanilMusicDB
\ No newline at end of file
/node_modules
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "homework",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "ts-node-dev --respawn --trace-warnings --transpile-only src/index.ts",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"@types/cors": "^2.8.13",
"@types/mongoose": "^5.11.97",
"cors": "^2.8.5",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"mongodb": "^5.1.0",
"mongoose": "^7.0.1",
"multer": "^1.4.5-lts.1",
"pg": "^8.10.0",
"pg-hstore": "^2.3.4",
"sequelize": "^6.29.3",
"sequelize-typescript": "^2.1.5",
"uuid": "^9.0.0"
},
"devDependencies": {
"@types/dotenv": "^8.2.0",
"@types/express": "^4.17.17",
"@types/mongodb": "^4.0.7",
"@types/multer": "^1.4.7",
"@types/uuid": "^9.0.1",
"@types/validator": "^13.7.14",
"ts-node-dev": "^2.0.0"
}
}
*
!.gitignore
\ No newline at end of file
import path from 'path'
export const config = {
port: 8000,
filePath: path.join(__dirname, '../public/uploads')
}
import express, { Express } from "express";
import dotenv from 'dotenv';
import cors from 'cors';
dotenv.config()
class App {
private app: Express
constructor() {
this.app = express()
this.app.use(express.json())
this.app.use(express.static('public'))
this.app.use(cors())
}
}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment