Last active
July 1, 2023 17:34
-
-
Save christopherbauer/daba6f88db5cae7d56800080c73426a2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import express, { Express, Request, Response } from "express"; | |
import dotenv from "dotenv"; | |
import userRouter from "./user"; | |
dotenv.config(); | |
const app: Express = express(); | |
const port = process.env.PORT || 3000; | |
app.use(json()); | |
app.get("/", (req: Request, res: Response) => { | |
res.send("Zapatos playground!"); | |
}); | |
app.use("/user", userRouter); | |
console.log(`⚡️[server]: Server starting up`); | |
app.listen(port, () => { | |
console.log(`⚡️[server]: Server is running at http://localhost:${port}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment