Skip to content

Instantly share code, notes, and snippets.

@harrietty
Last active December 22, 2017 12:41
Show Gist options
  • Select an option

  • Save harrietty/c203dbd7ffef6c3dfd4960712809011a to your computer and use it in GitHub Desktop.

Select an option

Save harrietty/c203dbd7ffef6c3dfd4960712809011a to your computer and use it in GitHub Desktop.
const app = express();
app.get('/api', (req, res) => res.send('All good'));
app.get('/api/hexes', (req, res) => res.send('So many hexes...'));
app.get('/api/hexes/words', (req, res) => res.send('List of words for hexes'));
app.delete('/api/hexes/:id', (req, res) => res.send(`Hex Number ${req.params.id} successfully deleted`));
app.listen(3000, () => console.log('App listening'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment