Skip to content

Instantly share code, notes, and snippets.

@JacobKnaack JacobKnaack/index.js Secret
Created Jun 13, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.