Skip to content

Instantly share code, notes, and snippets.

Last active October 11, 2018 09:58
What would you like to do?
Start template for Express web server in Node.js
// Import the "express" module for more powerful web server capabilities.
const express = require('express');
// Initialize the express module and make it accessible via the app variable.
const app = express()
app.get('/', async (req, res) => {
// We'll write all our code here. For now, to test
res.end("Hello DB!");
// Start the server, listen at port 3000 (->
// Also print a short info message to the console (visible in
// the terminal window where you started the node server).
app.listen(3000, () => console.log('Example app listening on port 3000!'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment