Skip to content

Instantly share code, notes, and snippets.

@JacobKnaack
Created June 13, 2019 16:56
Show Gist options
  • Save JacobKnaack/12519f0dcd4fca9329c87e2762da21fd to your computer and use it in GitHub Desktop.
Save JacobKnaack/12519f0dcd4fca9329c87e2762da21fd to your computer and use it in GitHub Desktop.
Cosmic Messenger INITIAL Entry file
const express = require('express');
const path = require('path');
const PORT = process.env.PORT || 3000;
const app = express();
const http = require('http').createServer(app);
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, './public', 'index.html'));
});
http.listen(PORT, () => {
console.log(`Cosmic Messenger listening on port : ${PORT}`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment