Skip to content

Instantly share code, notes, and snippets.

@adamhenson
Last active February 5, 2019 14:14
Show Gist options
  • Save adamhenson/657be4cca2bcc246704c638590b44784 to your computer and use it in GitHub Desktop.
Save adamhenson/657be4cca2bcc246704c638590b44784 to your computer and use it in GitHub Desktop.
A Node.js Express server JSON endpoint example.
import express from 'express';
const app = express();
app.get('/healthcheck', (...args) => {
const [, res] = args;
res.json({ ok: true });
});
app.listen(3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment