forgeplus-react/server/index.js

14 lines
321 B
JavaScript

import express from "express";
import {render} from "./render";
const app = express();
app.use(express.static('build'))
app.get('*',function (req,res) {
render(req,res);
})
const port = 3000
console.log(`\n==> 🌎 Listening on port ${port}. Open up http://localhost:${port}/ in your browser.\n`)
app.listen(port);