Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@hapi/joi": "^16.1.8",
"bcryptjs": "^2.4.3",
"connect-redis": "^4.0.3",
"dotenv": "^10.0.0",
"express": "^4.17.1",
"express-session": "^1.17.0",
"ioredis": "^4.14.1",
Expand Down
4 changes: 4 additions & 0 deletions api/src/config/app.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
if (process.env.NODE_ENV !== 'production') {
require('dotenv').config();
}

export const {
NODE_ENV = 'development',

Expand Down
8 changes: 8 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#docker file
FROM node:14
WORKDIR /usr/src/app
COPY ./api/package*.json ./
RUN npm install
COPY ./api/ .
EXPOSE 8888
CMD [ "node", "app.js" ]
14 changes: 14 additions & 0 deletions req.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
###
POST http://localhost:8888/register HTTP/1.1
content-type: application/json

{
"email": "[email protected]",
"name": "alex",
"password": "Jdepro123",
"passwordConfirmation": "Jdepro123"
}

###
GET http://localhost:8888/home HTTP/1.1
content-type: application/json