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
A CLI tool to build project scaffolding for your new Colls API.
3
3
4
-
## Pre-requisites
5
-
6
-
- Install & run `MongoDB Server` for your local environment
7
-
- (Optional) Install `nodemon` to run your application.
8
-
9
4
## Installation
10
5
Install `colls-api-cli`
11
6
12
7
```sh
13
8
npm install colls-api-cli -g
14
9
```
15
10
16
-
Navigate to your new desired project location. Run the following command to initiate prompts to begin your build.
11
+
Navigate to your new desired project location.
12
+
13
+
Run the following command to initiate prompts to begin your build.
17
14
18
15
```sh
19
16
colls build
@@ -27,7 +24,25 @@ Next, install all project dependencies.
27
24
npm install
28
25
```
29
26
30
-
Now your API setup has been completed and you should be able to run the main `app.js` file to serve your api.
27
+
Now your new API setup has been completed.
28
+
29
+
## Running the API
30
+
31
+
I would personally recommend installing `nodemon` to serve your api on your local environment.
32
+
33
+
```sh
34
+
npm install nodemon -g
35
+
```
36
+
37
+
Nodemon makes it much easier for development. You can change any code within the `app.js` code structure and nodemon will automatically apply changes and restart the server as soon as you save the changes in your files.
38
+
39
+
To boot up your server, simply run the following command.
40
+
41
+
```sh
42
+
nodemon app
43
+
```
44
+
45
+
## Try it out!
31
46
32
47
By default, your api will be served on port `3000`. To test your first endpoint, navigate to...
0 commit comments