Skip to content

Instantly share code, notes, and snippets.

@simon-saliba
Last active January 23, 2021 15:40
Show Gist options
  • Save simon-saliba/bbd97e81c10568ba7793f5ef182c3345 to your computer and use it in GitHub Desktop.
Save simon-saliba/bbd97e81c10568ba7793f5ef182c3345 to your computer and use it in GitHub Desktop.
backend-dev-version
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