Last active
May 12, 2020 14:31
-
-
Save dongido001/d492e354fa14b24f07f424db62a795af to your computer and use it in GitHub Desktop.
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
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