sleep-tracker-backend/index.js
2019-08-01 22:38:07 +02:00

16 lines
390 B
JavaScript

require("dotenv").config();
const server = require("./api/server");
server.get("/", (req, res) => {
res.json({
message: `API server for Sleep Tracker up and running. :)`,
documentation: `https://github.com/ruihildt/sleep-tracker-backend#api-documentation`
});
});
const PORT = process.env.PORT || 4000;
server.listen(PORT, () => {
console.log(`Listening on port ${PORT}...`);
});