diff options
Diffstat (limited to 'server/index.js')
-rw-r--r-- | server/index.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/server/index.js b/server/index.js new file mode 100644 index 0000000..57546fd --- /dev/null +++ b/server/index.js @@ -0,0 +1,18 @@ +import Express from "express"; +import cors from "cors"; +import dotenv from "dotenv"; + +import binRoutes from "./routes/bin.js"; +import healthRoutes from "./routes/health.js"; + +const app = Express(); +dotenv.config(); + +app.use(cors()); +app.use(Express.json()); +app.use("/", healthRoutes); +app.use("/bin", binRoutes); + +const PORT = process.env.PORT; + +app.listen(PORT, () => console.log(`Server running on PORT: ${PORT}`)); |