Skip to content

Instantly share code, notes, and snippets.

@LiorB-D
Last active April 23, 2021 02:38
Show Gist options
  • Save LiorB-D/3311e813df66679d106403ebe54c4558 to your computer and use it in GitHub Desktop.
Save LiorB-D/3311e813df66679d106403ebe54c4558 to your computer and use it in GitHub Desktop.
server.js - Chaos Game in JS
var express = require('express'); // Require the Express NPM package
var app = express(); // Initialize our app
var path = require('path'); // Library neccesary for locating the path of our HTML
app.get('/', function(req, res) { // When someone enters our site
res.sendFile(path.join(__dirname + '/index.html')); //Serve them the index.html file
});
app.listen(3000); //Run this server on port 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment