You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
417 B
JavaScript

var express = require("express");
var cors = require("cors");
require("dotenv").config();
var app = express();
app.use(cors());
app.use("/public", express.static(process.cwd() + "/public"));
app.get("/", function (req, res) {
res.sendFile(process.cwd() + "/views/index.html");
});
const port = process.env.PORT || 3000;
app.listen(port, function () {
console.log("Your app is listening on port " + port);
});