https://github.com/evanshortiss/nodejs-basic-auth-example
A sample application that uses basic access authentication, and performs server-side rendering
https://github.com/evanshortiss/nodejs-basic-auth-example
basic-authentication example example-app node nodejs
Last synced: 4 months ago
JSON representation
A sample application that uses basic access authentication, and performs server-side rendering
- Host: GitHub
- URL: https://github.com/evanshortiss/nodejs-basic-auth-example
- Owner: evanshortiss
- Created: 2020-08-20T10:46:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-20T10:58:43.000Z (over 5 years ago)
- Last Synced: 2025-06-18T05:42:14.327Z (8 months ago)
- Topics: basic-authentication, example, example-app, node, nodejs
- Language: JavaScript
- Homepage:
- Size: 94.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Basic App
## Node.js Setup
Install Node.js. Using [nvm](https://github.com/nvm-sh/nvm) is a good approach
since it simplifies switching Node.js versions.
``` bash
# install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
# update your ~/.bashrc or ~/.bash_profile based on the nvm output
vi ~/.bash_profile
# install and enable node.js 12
nvm install 12
nvm use 12
```
## Run the Application
### In Development Mode
This starts the server in dev mode using `nodemon`. This enables live reload
for changes so you don't need to restart the server each time you make a
change.
```bash
npm install
npm run dev
```
### Production Mode
```bash
npm start
```
## Authentication
This application uses Basic Authentication. It will prompt for a username and
password to login.
Use a username and password from the `users.js` file in this repository, e.g
`jane` and `janepass`.
