Skip to content

Instantly share code, notes, and snippets.

@shawnco
Last active May 27, 2022 14:39
Show Gist options
  • Save shawnco/b18692cf1b3aa4759a4308902c011334 to your computer and use it in GitHub Desktop.
Save shawnco/b18692cf1b3aa4759a4308902c011334 to your computer and use it in GitHub Desktop.
Collaborative Drawing App article, Express skeleton
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