Skip to content

Instantly share code, notes, and snippets.

@dongido001
Last active May 12, 2020 14:31
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 dongido001/d492e354fa14b24f07f424db62a795af to your computer and use it in GitHub Desktop.
Save dongido001/d492e354fa14b24f07f424db62a795af to your computer and use it in GitHub Desktop.
const express = require('express')
const app = express()
const port = 3000
app.use(express.static((__dirname + 'public')));
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(express.static('public'));
app.get('/', (req, res) => res.sendFile(__dirname + 'index.html'))
app.listen(port, () => {
console.log(`Example app listening at http://localhost:${port}`)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment