You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
296 B
15 lines
296 B
3 months ago
|
import express from "express";
|
||
|
import cors from "cors";
|
||
|
import router from "./routes/api_router.js";
|
||
|
|
||
|
const app = express();
|
||
|
app.use(express.json());
|
||
|
app.use(cors());
|
||
|
|
||
|
const onListening =() => {
|
||
|
console.log("Listening on port 5000");
|
||
|
}
|
||
|
|
||
|
app.use("/api", router);
|
||
|
|
||
|
app.listen(5000, onListening)
|