Last active
May 27, 2022 14:39
-
-
Save shawnco/b18692cf1b3aa4759a4308902c011334 to your computer and use it in GitHub Desktop.
Collaborative Drawing App article, Express skeleton
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 bodyParser = require('body-parser'); | |
const path = require('path'); | |
const PORT = 3000; | |
const app = express(); | |
app.use(bodyParser.json()); | |
app.use(express.static(path.join(__dirname + '/../client'))); | |
app.get('/api/test', (req, res) => { | |
res.end('Test works!'); | |
}); | |
app.listen(PORT, () => { | |
console.log(`App is live on port ${PORT}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment