Last active
May 3, 2017 12:46
-
-
Save agawish/7bdab889786a1e2bedad96afbc1519e9 to your computer and use it in GitHub Desktop.
Extending bot functionality to serve a public webpage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Express | |
let express = require('express'); | |
let app = express(); | |
app.use(express.static('public')) | |
app.get('/', function(req, res){ | |
res.sendFile('public/index.html', { root : __dirname}); | |
}); | |
app.listen(process.env.PORT || 9000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment