Table of Contents
![Product Name Screen Shot][product-screenshot]
Here's a blank template to get started: To avoid retyping too much info. Do a search and replace with your text editor for the following: github_username
, repo_name
, twitter_handle
, linkedin_username
, email_client
, email
, project_title
, project_description
- [![Next][next.js]][next-url]
- [![React][react.js]][react-url]
- [![Vue][vue.js]][vue-url]
- [![Angular][angular.io]][angular-url]
- [![Svelte][svelte.dev]][svelte-url]
- [![Laravel][laravel.com]][laravel-url]
- [![Bootstrap][bootstrap.com]][bootstrap-url]
- [![JQuery][jquery.com]][jquery-url]
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
This is an example of how to list things you need to use the software and how to install them.
-
Install node via nvm
brew update brew doctor brew install nvm mkdir ~/.nvm <!-- setup path --> echo "export NVM_DIR=~/.nvm\nsource \$(brew --prefix nvm)/nvm.sh" >> .zshrc source ~/.zshrc <!-- show the version of nvm you have installed --> nvm -v
-
Install postgresql
brew update brew doctor brew install postgresql <!-- start postgres --> brew services start postgresql <!-- stop postgres --> brew services stop postgresql
-
Create Database
psql postgres
CREATE ROLE ${role} WITH LOGIN PASSWORD ${password}; ALTER ROLE ${role} CREATEDB; CREATE DATABASE chuckster OWNER ${role}
-
Clone the repo
git clone https://github.com/holdonowgo/chuck-butt.git
-
Switch to proper node version
$ nvm use Found '<proj-root-dir>/.nvmrc' with version <v16> N/A: version "v16 -> N/A" is not yet installed. You need to run "nvm install v16" to install it before using it. <!-- check the version of node you are using --> $ nvm current v16.17.1
-
Install NPM packages
npm install
-
Setup your local
.env
file- from project root dir
touch .env
- The
.env
file should have the values for the keys listed below. Edit the values as needed
PORT=8000 <!-- development | test | production --> NODE_ENV=development <!-- dev values --> DEV_JWT_SECRET=secret DEV_DATABASE_NAME=chuckster DEV_DATABASE_URL=postgres://Randall.Spencer:postgres@localhost:5432/chuckster DEV_DATABASE_USERNAME=Randall.Spencer DEV_DATABASE_PASSWORD= <!-- test values --> TEST_JWT_SECRET=secret TEST_DATABASE_NAME=chuckster TEST_DATABASE_URL=postgres://postgres:postgres@localhost:5432/chuckster-test TEST_DATABASE_USERNAME=testusername TEST_DATABASE_PASSWORD=testpassword <!-- prod values --> JWT_SECRET=secret DATABASE_NAME=chuckster DATABASE_URL=postgres://postgres:postgres@localhost:5432/chuckster DATABASE_USERNAME=produsername DATABASE_PASSWORD=prodpassword
-
Create pub/priv keys
- This key will be used as the JWT secret to sign JWT tokens
<!-- In project root directory --> <!-- private key --> ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key <!-- public key --> openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
- See
src/index.ts
for usage
const RSA_PRIVATE_KEY = fs.readFileSync(__dirname + '/../jwtRS256.key');
-
Run DB Migrations
- from root directory of project
ts-node ./db/migrate.ts
-
Populate DB with seed data
- TBA
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
For more examples, please refer to the Documentation
- Feature 1
- Feature 2
- Feature 3
- Nested Feature
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Your Name - @twitter_handle - email@email_client.com
Project Link: https://github.com/holdonowgo/chuckster