Skip to content

Instantly share code, notes, and snippets.

@tsh-code
Last active January 18, 2020 22:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsh-code/a5b79c4545b9cfe528ede1d86f3818e4 to your computer and use it in GitHub Desktop.
Save tsh-code/a5b79c4545b9cfe528ede1d86f3818e4 to your computer and use it in GitHub Desktop.
Simple REST app
const express = require("express");
const app = express();
const mockedUsers = [
{
id: 1,
firstname: "John",
lastname: "Doe"
}
];
app.get("/users", (req, res) => {
res.json(mockedUsers);
});
app.listen(3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment