summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJoseph Ditton <jditton.atomic@gmail.com>2022-03-01 10:02:11 -0700
committerJoseph Ditton <jditton.atomic@gmail.com>2022-03-01 10:02:11 -0700
commit7b36cf4e027e1e276c2e8f8295ba54799c1ca17e (patch)
tree32f61020c1d00622e8395ad87c0d45124de79811 /README.md
parentfc4a758426cae6e28e0cbd637cb87d01f72c4ab4 (diff)
downloadlocchat-7b36cf4e027e1e276c2e8f8295ba54799c1ca17e.tar.gz
locchat-7b36cf4e027e1e276c2e8f8295ba54799c1ca17e.zip
remove $ from commands for easy copy paste
Diffstat (limited to 'README.md')
-rw-r--r--README.md36
1 files changed, 18 insertions, 18 deletions
diff --git a/README.md b/README.md
index 57b8098..bcd59ee 100644
--- a/README.md
+++ b/README.md
@@ -7,19 +7,19 @@ A starter app with Postgres, NestJS, and React
IMPORTANT Windows users should setup WSL first before cloning. See [WSL_SETUP.md](/WSL_SETUP.md)
This app is designed to used as a starting point for another application so you will want to clone the project into a folder that matches your app. Run
```bash
-$ git clone git@github.com:dittonjs/NestStarterApp.git <YourAppName>
+git clone git@github.com:dittonjs/NestStarterApp.git <YourAppName>
```
a
Replace your app name with the name of your app, for example
```bash
-$ git clone git@github.com:dittonjs/NestStarterApp.git SpyChat
+git clone git@github.com:dittonjs/NestStarterApp.git SpyChat
```
Next, go create a remote repository in github (or gitlab, or bitbucket, it doesn't matter) for your new application.
Finally, run
```bash
-$ bash ./bin/setup_new_project.sh
+bash ./bin/setup_new_project.sh
```
and follow the prompts. This script will link the repo to your new repo while maintaining a reference to the starter app repo. This way, if we make changes to the starter app repo, you can still get those changes.
@@ -27,7 +27,7 @@ and follow the prompts. This script will link the repo to your new repo while ma
To retrieve changes from the starter app run
```bash
-$ git pull upstream main
+git pull upstream main
```
## Prerequisites
### VSCode
@@ -47,13 +47,13 @@ Make sure your have navigated to the project directory in your terminal.
### Tool versions
Install the tool versions by running
```bash
-$ asdf install
+asdf install
```
### Install yarn
We will use `yarn` instead of `npm` for package managment. To install yarn run
```bash
-$ npm install -g yarn
+npm install -g yarn
```
### .env
@@ -66,14 +66,14 @@ In your new `.env` file update the values for each key as you would like
### Dependencies
To install the both server and client dependencies run
```bash
-$ yarn # this is same thing as `yarn install`
+yarn # this is same thing as `yarn install`
```
Notice that the `client` folder has its own `package.json` file and its own `node_modules`. If you add dependencies for the client make sure to `cd` into the `client` directory before doing `yarn add`
### Database
This application uses Postgres. To setup the database run
```bash
-$ yarn db:setup
+yarn db:setup
```
This will create the database, run the migrations, and run the seeds for you.
@@ -84,7 +84,7 @@ yarn db:migration:create AddContextToRoles # replace this name with a name that
```
Open that migration file and make the changes. Then, when you are ready
```bash
-$ yarn db:migrate
+yarn db:migrate
```
will run any pending migrations.
@@ -97,7 +97,7 @@ If you make changes to the seeds file at `server/database/seeds.ts` the make sur
To run the seeds
```bash
-$ yarn db:seed
+yarn db:seed
```
### SSL
@@ -111,19 +111,19 @@ USE_SSL=true
Create a ssl key and certificate and place them in the root directory
```bash
-$ openssl req -x509 -newkey rsa:4096 -keyout private-key.pem -out public-cert.pem -sha256 -nodes
+openssl req -x509 -newkey rsa:4096 -keyout private-key.pem -out public-cert.pem -sha256 -nodes
```
Enter `US` for the country code. Where this key will only be used for development you can leave all of the rest of information blank.
## Running the app
To start the server run
```bash
-$ yarn start:dev
+yarn start:dev
```
To start the client run
```bash
-$ yarn client:watch
+yarn client:watch
```
YOU NEED TO RUN EACH OF THESE COMMANDS IN A SEPARATE TERMINAL TAB / WINDOW
@@ -137,13 +137,13 @@ On heroku.com create an account.
If you don't have the heroku CLI installed you can install it by running. You should only need to do this once on each computer you are working on.
```bash
-$ curl https://cli-assets.heroku.com/install.sh | sh
+curl https://cli-assets.heroku.com/install.sh | sh
```
### Login to CLI
To log into the CLI run
```bash
-$ heroku login
+heroku login
```
and follow the prompts. After a while, you maybe be prompted to login again which is fine.
@@ -175,16 +175,16 @@ All vars should be named the exact same as they are in the `.env` file.
### Link to Heroku
You publish to Heroku using `git`. Run the following command to add the heroku remote
```bash
-$ heroku git:remote -a <your app name>
+heroku git:remote -a <your app name>
```
If your app name in Heroku was `spy-chat` then you would run
```bash
-$ heroku git:remote -a spy-chat
+heroku git:remote -a spy-chat
```
## Deploying
We finally made it! To deploy your app to Heroku run
```bash
-$ git push heroku main
+git push heroku main
```
and thats it!