Skip to content

Commit

Permalink
Use loadEnvFile instead of dotenv
Browse files Browse the repository at this point in the history
  • Loading branch information
soruly committed Jun 30, 2024
1 parent 6507ac5 commit 4da752b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Note that you need to configure a reverse proxy if you need HTTPS.

### Host bare-metal with Node.js

Install Node.js 18.x, then:
Install Node.js >= 20.12, then:

```
git clone https://github.com/soruly/trace.moe-telegram-bot.git
Expand Down
12 changes: 0 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
},
"homepage": "https://github.com/soruly/trace.moe-telegram-bot",
"dependencies": {
"dotenv": "^16.4.5",
"express": "^4.19.2",
"express-rate-limit": "^7.3.1"
},
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import "dotenv/config";
import fs from "node:fs/promises";
import child_process from "node:child_process";
import express from "express";
import rateLimit from "express-rate-limit";

process.loadEnvFile();
const {
PORT = 3000,
TELEGRAM_TOKEN,
Expand Down

0 comments on commit 4da752b

Please sign in to comment.