diff --git a/README.md b/README.md index 437ffa48..db4ee800 100644 --- a/README.md +++ b/README.md @@ -29,22 +29,21 @@ So people and/or organization can see the stats of programming language being us ### Supported environment: * Prerequisite: ```bash -Node >= v18.18.0 -NPM >= 9.5.0 +Node >= 20.6.0+ (to enable .env support) +NPM >= 9.8.1 ``` * [Generate access token (classic)](https://github.com/settings/tokens/new) with `repo` scope to ensure you don't get rate limited API call. -* Define environment variable with the following values: +* Copy `.env.example` to `.env` and fill in the required environment variables: ``` -TOKEN=your-access-token ENV=local +TOKEN=your_github_access_token_here +PORT=3000 ``` -An example of environment variable is provided [here](.env.example) - * Install dependency: `npm install` -* Start the app ` npm run start` and go to `http://localhost:3000` +* Start the app `npm run start:local` and go to `http://localhost:3000` ## Running with hot-reload ```bash diff --git a/package.json b/package.json index 396d9a1c..2133a617 100644 --- a/package.json +++ b/package.json @@ -4,12 +4,13 @@ "type": "module", "description": "show programming language based on the repos of github's account", "engines": { - "node": "18.18.0", + "node": "20.6.0", "npm": "9.5.0" }, "main": "index.js", "scripts": { "start": "node src/api/app.js | gulp", + "start:local": "node --env-file=.env src/api/app.js | gulp", "dev": "concurrently \"node src/api/app.js\" \"gulp watch\"", "lint": "eslint '**/*.js' --ignore-pattern src/utils/*.js", "lint:fix": "eslint --fix '**/*.js' --ignore-pattern node_modules/", diff --git a/src/pages/partials/body.handlebars b/src/pages/partials/body.handlebars index 004186c3..6669775c 100644 --- a/src/pages/partials/body.handlebars +++ b/src/pages/partials/body.handlebars @@ -114,4 +114,4 @@ showLoader(); return true; } - + \ No newline at end of file