sleep-tracker-backend/index.js

15 lines
295 B
JavaScript
Raw Normal View History

2019-07-31 07:14:12 +00:00
require("dotenv").config();
const server = require("./api/server");
server.get("/", (req, res) => {
res.json({
message: `API server for Sleep Tracker running. :)`
});
});
const PORT = process.env.PORT || 4000;
2019-07-31 07:14:12 +00:00
server.listen(PORT, () => {
console.log(`Listening on port ${PORT}...`);
});