You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-27
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,7 @@ Install [Node.js and NPM](https://nodejs.org/en/download/)
89
89
Install yarn globally
90
90
91
91
```bash
92
-
npm install yarn -g
92
+
yarn install yarn -g
93
93
```
94
94
95
95
Install a MySQL database.
@@ -107,17 +107,17 @@ Create a new database with the name you have in your `.env`-file.
107
107
Then setup your application environment.
108
108
109
109
```bash
110
-
npm run setup
110
+
yarn run setup
111
111
```
112
112
113
113
> This installs all dependencies with yarn. After that it migrates the database and seeds some test data into it. So after that your development environment is ready to use.
114
114
115
115
### Step 3: Serve your App
116
116
117
-
Go to the project dir and start your app with this npm script.
117
+
Go to the project dir and start your app with this yarn script.
118
118
119
119
```bash
120
-
npm start serve
120
+
yarn start serve
121
121
```
122
122
123
123
> This starts a local server using `nodemon`, which will watch for any file changes and will restart the sever according to these changes.
@@ -135,42 +135,42 @@ All script are defined in the `package-scripts.js` file, but the most important
135
135
136
136
### Linting
137
137
138
-
- Run code quality analysis using `npm start lint`. This runs tslint.
138
+
- Run code quality analysis using `yarn start lint`. This runs tslint.
139
139
- There is also a vscode task for this called `lint`.
140
140
141
141
### Tests
142
142
143
-
- Run the unit tests using `npm start test` (There is also a vscode task for this called `test`).
144
-
- Run the integration tests using `npm start test.integration`.
145
-
- Run the e2e tests using `npm start test.e2e`.
143
+
- Run the unit tests using `yarn start test` (There is also a vscode task for this called `test`).
144
+
- Run the integration tests using `yarn start test.integration`.
145
+
- Run the e2e tests using `yarn start test.e2e`.
146
146
147
147
### Running in dev mode
148
148
149
-
- Run `npm start serve` to start nodemon with ts-node, to serve the app.
149
+
- Run `yarn start serve` to start nodemon with ts-node, to serve the app.
150
150
- The server address will be displayed to you as `http://0.0.0.0:3000`
151
151
152
152
### Building the project and run it
153
153
154
-
- Run `npm start build` to generated all JavaScript files from the TypeScript sources (There is also a vscode task for this called `build`).
155
-
- To start the builded app located in `dist` use `npm start`.
154
+
- Run `yarn start build` to generated all JavaScript files from the TypeScript sources (There is also a vscode task for this called `build`).
155
+
- To start the builded app located in `dist` use `yarn start`.
156
156
157
157
### Database Migration
158
158
159
-
- Run `typeorm migrations:create -n <migration-file-name>` to create a new migration file.
159
+
- Run `typeorm migration:create -n <migration-file-name>` to create a new migration file.
160
160
- Try `typeorm -h` to see more useful cli commands like generating migration out of your models.
161
-
- To migrate your database run `npm start db.migrate`.
162
-
- To revert your latest migration run `npm start db.revert`.
163
-
- Drops the complete database schema `npm start db.drop`.
161
+
- To migrate your database run `yarn start db.migrate`.
162
+
- To revert your latest migration run `yarn start db.revert`.
163
+
- Drops the complete database schema `yarn start db.drop`.
164
164
165
165
### Database Seeding
166
166
167
-
- Run `npm start db.seed` to seed your seeds into the database.
167
+
- Run `yarn start db.seed` to seed your seeds into the database.
168
168
169
169

170
170
171
171
## ❯ Debugger in VSCode
172
172
173
-
To debug your code run `npm start build` or hit <kbd>cmd</kbd> + <kbd>b</kbd> to build your app.
173
+
To debug your code run `yarn start build` or hit <kbd>cmd</kbd> + <kbd>b</kbd> to build your app.
174
174
Then, just set a breakpoint and hit <kbd>F5</kbd> in your Visual Studio Code.
175
175
176
176

@@ -228,7 +228,6 @@ The swagger and the monitor route can be altered in the `.env` file.
228
228
|**test/unit/***.test.ts | Unit tests |
229
229
| .env.example | Environment configurations |
230
230
| .env.test | Test environment configurations |
231
-
| ormconfig.json | TypeORM configuration for the database. Used by seeds and the migration. (generated file) |
232
231
| mydb.sql | SQLite database for integration tests. Ignored by git and only available after integration tests |
233
232
234
233

@@ -378,19 +377,18 @@ export class CreatePets implements SeedsInterface {
378
377
The last step is the easiest, just hit the following command in your terminal, but be sure you are in the projects root folder.
0 commit comments