Removed dollar sign from start of any CLI examples in docs so they can be directly copied.

* Improved docs to avoid issue with missing bash command on getting-started page

* Removed dollar sign from start of any CLI examples in docs.

Co-authored-by: Martin Sosic <sosic.martin@gmail.com>
This commit is contained in:
Matija Stepanic 2021-10-22 11:49:21 +02:00 committed by GitHub
parent 07f111903c
commit a9aa4ff446
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 19 deletions

View File

@ -14,7 +14,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
### Node.js >= 12.18.0
```shell-session
$ node -v # >= v12.18.0
node -v # >= v12.18.0
```
We recommend using [nvm](https://github.com/nvm-sh/nvm) for managing your Node.js installation version(s).
@ -29,18 +29,18 @@ We recommend using [nvm](https://github.com/nvm-sh/nvm) for managing your Node.j
Then, install a version of node that you need (any >= 12.18.0), e.g.:
```shell-session
$ nvm install 12
nvm install 12
```
Finally, whenever you need to ensure specific version of node is used, run e.g.
```shell-session
$ nvm use 12
nvm use 12
```
to set the node version for current shell session.
You can run
```shell-session
$ node -v
node -v
```
to check the version of node currently being used in this shell session.
@ -99,9 +99,9 @@ Check [waspc/](https://github.com/wasp-lang/wasp/tree/master/waspc) for more det
## 3. Creating and running your first app
```shell-session
$ wasp new MyNewApp # Creates a new web app named MyNewApp.
$ cd MyNewApp
$ wasp start # Serves the web app.
wasp new MyNewApp # Creates a new web app named MyNewApp.
cd MyNewApp
wasp start # Serves the web app.
```
That's it :tada:! You have successfully created and served a new web app at <http://localhost:3000> and Wasp is serving both frontend and backend for you.

View File

@ -29,7 +29,7 @@ psl=}
Run:
```shell-session
$ wasp db migrate-dev
wasp db migrate-dev
```
to propagate the schema change (we added User).
@ -157,7 +157,7 @@ Ok, time to try out how this works!
Now, we can again run
```shell-session
$ wasp start
wasp start
```
Try going to `/` in our web app -> it will now ask you to log in, and if you follow the link, you will end up at `/login`.
@ -165,7 +165,7 @@ Once you log in or sign up, you will be sent back to `/` and you will see the to
Let's now see how things look in the database! Run:
```shell-session
$ wasp db studio
wasp db studio
```
<img alt="Database demonstration - password hashing"
src={useBaseUrl('img/wasp_db_hash_demonstration.gif')}
@ -201,7 +201,7 @@ psl=}
We modified entities by adding User-Task relation, so let's run
```shell-session
$ wasp db migrate-dev
wasp db migrate-dev
```
to create a database schema migration and apply it to the database.
@ -256,13 +256,13 @@ Right, that should be it!
Run
```shell-session
$ wasp start
wasp start
```
and everything should work as expected now! Each user has their own tasks only they can see and edit.
Try playing around with our app, adding a few users and some tasks. Then run:
```shell-session
$ wasp db studio
wasp db studio
```
<img alt="Database demonstration"
src={useBaseUrl('img/wasp_db_demonstration.gif')}

View File

@ -6,12 +6,12 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
Run the following command in your terminal to create a new Wasp project:
```shell-session
$ wasp new TodoApp
wasp new TodoApp
```
Enter the created directory and run:
```shell-session
$ cd TodoApp
$ wasp start
cd TodoApp
wasp start
```
You have just ran your app in the development mode!

View File

@ -19,7 +19,7 @@ json=}
Run (if it is already running, stop it first and then run it again)
```shell-session
$ wasp start
wasp start
```
to have Wasp download and install new dependency (that happens on start of `wasp start`).

View File

@ -21,13 +21,13 @@ Since Wasp uses [Prisma](https://www.prisma.io) as a database, definition of an
After this change and before running `wasp start`, we first need to run:
```shell-session
$ wasp db migrate-dev
wasp db migrate-dev
```
This instructs Prisma to create a new database schema migration (you'll see a new directory `migrations/` appeared in the root dir of our app) and apply it to the database.
To take a look at the database and the new `Task` schema, run:
```shell-session
$ wasp db studio
wasp db studio
```
<img alt="Todo App - Db studio showing Task schema"