doc: create a public directory

This commit is contained in:
Leon Xu committed 2022-04-12 12:14:34 -07:00
1 parent 3ce002c257
commit 8ac37b3d9c
1 file changed
+4
+4
View File
@@ -22,6 +22,10 @@ app.use(cors());
// Use middleware to connect
app.use("/api", ncovRoute);
// Create a public directory
const __dirname = path.resolve();
app.use(express.static(path.join(__dirname, "./public")));
// Setup body parser
app.use(bodyParser.json({ limit: "30mb", extended: true }));
app.use(bodyParser.urlencoded({ limit: "30mb", extended: true }));