use chemical with wisp, cleanup
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
import { ChemicalServer } from "chemicaljs";
|
||||
import next from "next";
|
||||
|
||||
const [app, listen] = new ChemicalServer({
|
||||
default: "uv",
|
||||
uv: true,
|
||||
rammerhead: false,
|
||||
});
|
||||
const port = process.env.PORT || 3000;
|
||||
const dev = process.env.NODE_ENV !== "production";
|
||||
const nextApp = next({ dev });
|
||||
const handle = nextApp.getRequestHandler();
|
||||
|
||||
nextApp.prepare().then(() => {
|
||||
app.serveChemical();
|
||||
|
||||
app.all("*", (req, res) => {
|
||||
return handle(req, res);
|
||||
});
|
||||
|
||||
listen(port, () => {
|
||||
console.log(`Radius listening on port ${port}`);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user