Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ can be run as follows:
3. Create a `.env` file based on `.env.example`.
4. Optionally modify the values (not the keys) of `src/qrCodeUrls.ts` to point to up-to-date URLs for the Discord and the repository for this project, if they've changed. Please commit those changes.
4. Run `npm install` to install dependencies. (See [CONTRIBUTING.md](CONTRIBUTING.md) for detail about how to install dependencies when changing the set of dependencies.)
5. Run `npm run build` to make `npm run start` work (I haven't investigated why this is necessary).
5. Run `npm run start`.
5. Run `npm run dev`.

### How to use

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"files": ["./dist/*", "./views/*"],
"scripts": {
"clean": "rimraf ./dist/",
"build": "npm run build-ts && npx vite build && npm run generate:qr",
"dev": "npm run build && npm run start",
"build": "npm run build-ts && vite build && npm run generate:qr",
"dev": "vite build && npm run generate:qr && ts-node ./src/server.ts",
"generate:qr": "ts-node ./scripts/generate-qr.ts",
"build-ts": "tsc",
"watch-ts": "tsc -w",
Expand Down
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ app.use(compression());
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));

app.use(express.static(path.join(__dirname, "public"), { maxAge: 0 }));
app.use(express.static(path.join("dist", "public"), { maxAge: 0 }));
app.use("/api/*", cache("1 minute"));

app.get("/", homeController.index);
Expand Down