Skip to content

Commit

Permalink
Sans serveur express
Browse files Browse the repository at this point in the history
  • Loading branch information
julienmalard committed Feb 4, 2024
1 parent 615d21f commit c0753f4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/serveur.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import express from "express";
/*import express from "express";
import path from "path";
import serveStatic from "serve-static";
import compression from "compression";
import compression from "compression";*/

import { créerNœud, obtAdressesNœud } from "./relai.js";

const nœud = await créerNœud();
obtAdressesNœud(nœud);
/*
const app = express();
app.use(compression());
Expand All @@ -14,8 +17,7 @@ app.use(serveStatic(path.join("/dist")));
if (process.env.NODE_ENV === "production") {
app.use(express.static("client/build"));
}
const nœud = await créerNœud();
obtAdressesNœud(nœud);
app.get("/", (_request, response) => {
response.sendFile(path.join("src", "index.html"), { root: "." });
});
Expand All @@ -26,3 +28,4 @@ app.get("/adresses", async (_request, response) => {
const port = process.env.PORT || 8000;
app.listen(port);
*/

0 comments on commit c0753f4

Please sign in to comment.