Skip to content

Instantly share code, notes, and snippets.

@Kernix13
Created March 31, 2024 14:53
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 Kernix13/0e3c59cc6892ca90b60c624bdad9ab4d to your computer and use it in GitHub Desktop.
Save Kernix13/0e3c59cc6892ca90b60c624bdad9ab4d to your computer and use it in GitHub Desktop.
Basic Node and Express.js Server
// npm i express mongoose ejs
// in app.js
const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.send('Home Route');
});
app.listen(3000, () => {
console.log('LISTENING ON PORT 3000');
});
// then run nodemon app.js and visit localhost:3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment