liblibgo/backend/index.js

19 lines
447 B
JavaScript
Raw Permalink Normal View History

2023-03-20 16:24:34 +00:00
import "dotenv/config";
import express from "express";
import swagger from "swagger-ui-express";
import { swaggerOptions } from "./swagger-options.js";
const app = express();
const PORT = process.env.port || 8193;
app.get("/", (req, res) => {
res.send("Hello World!");
});
// docs
app.use("/api-docs", swagger.serve, swagger.setup(swaggerOptions));
app.listen(PORT, () => {
console.log(`LibLibGo running @ http://127.0.0.1:${PORT}/`);
});