Last active
January 23, 2021 15:40
-
-
Save simon-saliba/bbd97e81c10568ba7793f5ef182c3345 to your computer and use it in GitHub Desktop.
backend-dev-version
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
const express = require('express'); | |
var cors = require('cors'); | |
let app = express(); | |
let port = process.env.PORT || 8080; | |
app.use(cors()); | |
app.get('/hello', function(req, res) { | |
res.json('Hello from backend !'); | |
}) | |
app.listen(port, () => { | |
console.log('Server listening on port: ' + port) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment