Skip to content

Commit 613dc5f

Browse files
authored
Merge pull request #43 from samuel-skean/main
Build times are mostly a thing of the past.
2 parents 8044150 + cd5f1fd commit 613dc5f

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ can be run as follows:
3131
3. Create a `.env` file based on `.env.example`.
3232
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.
3333
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.)
34-
5. Run `npm run build` to make `npm run start` work (I haven't investigated why this is necessary).
35-
5. Run `npm run start`.
34+
5. Run `npm run dev`.
3635

3736
### How to use
3837

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"files": ["./dist/*", "./views/*"],
1010
"scripts": {
1111
"clean": "rimraf ./dist/",
12-
"build": "npm run build-ts && npx vite build && npm run generate:qr",
13-
"dev": "npm run build && npm run start",
12+
"build": "npm run build-ts && vite build && npm run generate:qr",
13+
"dev": "vite build && npm run generate:qr && ts-node ./src/server.ts",
1414
"generate:qr": "ts-node ./scripts/generate-qr.ts",
1515
"build-ts": "tsc",
1616
"watch-ts": "tsc -w",

src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ app.use(compression());
2727
app.use(bodyParser.json());
2828
app.use(bodyParser.urlencoded({ extended: true }));
2929

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

3333
app.get("/", homeController.index);

0 commit comments

Comments
 (0)