Skip to content

Instantly share code, notes, and snippets.

@WINOFFRG
Created September 29, 2021 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WINOFFRG/fbd4a24fa5ade59a08cb51293cc4b1e0 to your computer and use it in GitHub Desktop.
Save WINOFFRG/fbd4a24fa5ade59a08cb51293cc4b1e0 to your computer and use it in GitHub Desktop.
Express Server Setup
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