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
+17-13Lines changed: 17 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,28 +48,30 @@ Install [Node.js and NPM](https://nodejs.org/en/download/)
48
48
* on Windows use [chocolatey](https://chocolatey.org/)`choco install nodejs`
49
49
50
50
Install yarn globally
51
-
```npm install yarn -g```
51
+
```
52
+
npm install yarn -g
53
+
```
52
54
53
55
Install a MySQL database.
54
56
55
-
> If you work with a mac, we recommend to use homebrew for the installation
57
+
> If you work with a mac, we recommend to use homebrew for the installation.
56
58
57
59
### Step 2: Create new Project
58
60
Fork or download this project. Configure your package.json for your new project.
59
61
60
-
Then copy the example.env file and enter your database connection.
62
+
Then copy the `example.env` file and rename it to `.env`. In this file you have to add your database connection information.
61
63
62
-
Create a new database. You will find the name in the .envfile.
64
+
Create a new database with the name you have in your `.env`-file.
63
65
64
66
Then setup your application environment.
65
67
```
66
68
npm run setup
67
69
```
68
70
69
-
> This installs all dependencies with yarn. After that it migrates the database and seeds some test data into it.
71
+
> 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.
70
72
71
73
### Step 3: Serve your App
72
-
Go to the project dir and start your app
74
+
Go to the project dir and start your app with this npm script.
73
75
```
74
76
npm run serve
75
77
```
@@ -78,18 +80,18 @@ npm run serve
78
80
> The server address will be displayed to you as `http://0.0.0.0:3000`.
79
81
80
82
### Step 4: Create a new Resource
81
-
Go to the project dir and hit this command
83
+
Go to the project dir and hit this command in your terminal.
82
84
```
83
85
npm run console make:resource
84
86
```
85
87
86
-
Apply the same information like you see below in the screenshot.
88
+
Apply the same information like you see in the screenshot below.
87
89
88
90

89
91
90
-
> Now you have created a complete new endpoint in your api for the resource pets.
92
+
> With that you just have created a complete new endpoint in your api for the resource pets.
91
93
92
-
We have to add the relationship between users an pets. Open the created migration file and replace the user property with these lines.
94
+
Normally a pet belogns to a user, so we have to add the relationship between users an pets. Open the created migration file and replace the user property with these lines.
0 commit comments