-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hamada Gasmallah
committed
Nov 10, 2022
0 parents
commit 14206b9
Showing
7 changed files
with
758 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM node:latest | ||
|
||
RUN mkdir -p /var/app/ | ||
WORKDIR /var/app | ||
|
||
COPY . . | ||
|
||
RUN npm i | ||
|
||
CMD npm run start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const express = require('express'); | ||
const morgan = require('morgan'); | ||
const cors = require('cors'); | ||
|
||
const port = process.env['APP_PORT'] || 3000; | ||
|
||
const app = express(); | ||
app.use( morgan('combined') ); | ||
app.use(cors()); | ||
|
||
app.get('/api/status', (req, res)=>{ | ||
res.sendStatus(200); | ||
}); | ||
|
||
app.get('/api/hello', (req, res)=>{ | ||
res.send("HELLO FROM THE BACKEND!"); | ||
}); | ||
|
||
app.listen(port, ()=>{ | ||
console.log(`Listening on port ${port}`); | ||
}); |
Oops, something went wrong.