Skip to content

Instantly share code, notes, and snippets.

@LiorB-D
Created June 19, 2021 02:46
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 LiorB-D/c39b3506840b0419340afac03f456a01 to your computer and use it in GitHub Desktop.
Save LiorB-D/c39b3506840b0419340afac03f456a01 to your computer and use it in GitHub Desktop.
// This is a basic express server to serve our static html file
var express = require('express');
var app = express();
var path = require('path');
app.use(express.static(__dirname + '/public'));
app.get('/', function(req, res) {
res.sendFile(path.join(__dirname + '/index.html'));
});
app.listen(3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment