Last active
January 18, 2020 22:36
-
-
Save tsh-code/a5b79c4545b9cfe528ede1d86f3818e4 to your computer and use it in GitHub Desktop.
Simple REST app
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 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