https://github.com/brandonbothell/login-boilerplate
A login app boilerplate built with TypeORM, PostgreSQL, and Express.
https://github.com/brandonbothell/login-boilerplate
api boilerplate database gui hashing login orm passwords template
Last synced: about 1 year ago
JSON representation
A login app boilerplate built with TypeORM, PostgreSQL, and Express.
- Host: GitHub
- URL: https://github.com/brandonbothell/login-boilerplate
- Owner: brandonbothell
- License: unlicense
- Created: 2019-10-03T02:45:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-11T10:28:43.000Z (over 1 year ago)
- Last Synced: 2025-03-11T11:32:49.973Z (over 1 year ago)
- Topics: api, boilerplate, database, gui, hashing, login, orm, passwords, template
- Language: HTML
- Homepage:
- Size: 1.26 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Login Boilerplate
Build/start with `npm run start` or `yarn start`
Start without building with `npm run start:nobuild` or `yarn start:nobuild`
## Configuration
You ***will*** want to edit the config file.
Watch the [tutorial](https://youtu.be/FnM_Z7-a2Mc) or follow these instructions:
1. Rename the example config (located at `api/config.example.json`) to `config.json`.
2. Make `secret` a secure and random string.
3. If using HTTP, leave the `port` as `80`. For HTTPS, change it to `443`.
4. Leave or change `https.useHttps` depending on what you're using.
5. If using HTTPS, change `https.crt` and `https.key` to your certificate and private key files, relative to the `api` folder.
*Note:* You should use HTTPS to make sure that passwords aren't intercepted by an attacker!
6. Change `postgres` to reflect your PostgreSQL setup.
7. Change the `API_ENDPOINT` var in `api/public/assets/js/globals.js` to the endpoint to make requests to the API to **without** a following slash.
8. After you start the API and a password is hashed, you may get a warning about it taking a too short/long amount of time.
* If it is taking <1000ms, raise the `hashingIterations` config option.
* If it is taking >2000ms, lower the `hashingIterations` config option.
* It may not always be perfect, and that's fine. Just make sure this warning doesn't go off for most password lengths.