Created
September 29, 2021 13:52
-
-
Save WINOFFRG/fbd4a24fa5ade59a08cb51293cc4b1e0 to your computer and use it in GitHub Desktop.
Express Server Setup
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'); | |
const cors = require('cors'); | |
const app = express(); | |
const port = 5000; | |
const BASE_URL = '/api'; | |
app.use(cors()); | |
app.get(`${BASE_URL}`, async (req, res) => { | |
res.send("Hello! I see you"); | |
}); | |
app.listen(port, () => { | |
console.log(`Listening on port ${port}`) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment