diff --git a/.gitignore b/.gitignore index f06235c..a0d218e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules dist +.env \ No newline at end of file diff --git a/package.json b/package.json index a8188ee..b25406d 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "@types/express": "^4.17.11", "@types/node": "^14.14.37", "cors": "^2.8.5", + "dotenv": "^8.2.0", "express": "^4.17.1", "typescript": "^4.2.4" } diff --git a/src/.env.sample b/src/.env.sample new file mode 100644 index 0000000..ccf3e60 --- /dev/null +++ b/src/.env.sample @@ -0,0 +1,4 @@ +NODE_ENV='dev' +APP_PORT=3000 +DB_USER= +DB_PASS= \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 965494c..c5abdd5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,31 +1,7 @@ -import * as express from 'express'; +import express = require('express'); const app = express(); -app.get('/user', (req, res) => {}); - -app.post('/user', (req, res) => {}); - -app.patch('/user', (req, res) => {}); - -app.delete('/user', (req, res) => {}); - -app.get('/pool', (req, res) => {}); - -app.post('/pool', (req, res) => {}); - -app.patch('/pool', (req, res) => {}); - -app.delete('/pool', (req, res) => {}); - -app.get('/group', (req, res) => {}); - -app.post('/group', (req, res) => {}); - -app.patch('/group', (req, res) => {}); - -app.delete('/group', (req, res) => {}); - app.get('/join_pool', (req, res) => {}); app.post('/join_pool', (req, res) => {}); diff --git a/tsconfig.json b/tsconfig.json index 2e3b371..b5da52a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "outDir": "dist/", + "esModuleInterop": true, }, "files": ["src/types.ts"], "include": ["src/"], diff --git a/yarn.lock b/yarn.lock index 9e24887..10556bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -150,6 +150,11 @@ destroy@~1.0.4: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= +dotenv@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"