File tree Expand file tree Collapse file tree 1 file changed +20
-19
lines changed
Expand file tree Collapse file tree 1 file changed +20
-19
lines changed Original file line number Diff line number Diff line change 1- # Grind API Example
1+ # Grind Example API
22
33## Installation
44
55``` bash
6- git clone https://github.com/shnhrrsn/grind -api-example .git
7- cd grind-api- example
6+ git clone https://github.com/grindjs/example -api.git grind-example-api
7+ cd grind-example-api
88npm install
9- ./db migrate:latest
10- ./db seed:run
9+ bin/cli migrate:latest
10+ bin/cli db:seed
1111```
1212
1313## Running
1414
1515``` bash
16- npm run serve # For a single worker
17- npm run cluster # For multiple workers
18- ```
16+ # Use `watch` to automatically restart the server on file changes
17+ # Watch is recommended for development
18+ bin/watch
1919
20- You should now be able to go to [ http://localhost:3000/states ] ( http://localhost:3000/states ) .
20+ # Use `serve --cluster` to launch a cluster of workers
21+ # Cluster is recommended for production
22+ bin/serve --cluster
2123
22- Other URLs:
24+ # Use `serve` to launch a single worker
25+ bin/serve
26+ ```
2327
24- * Paged: [ http://localhost:3000/states?limit=10 ] ( http://localhost:3000/states?limit=10 )
25- * Individual: [ http://localhost:3000/states/ny ] ( http://localhost:3000/states/ny )
26- * Search: [ http://localhost:3000/states/search?term=new ] ( http://localhost:3000/states/search?term=new )
27- * Swagger: [ http://petstore.swagger.io/?url=http://localhost:3000/swagger.json ] ( http://petstore.swagger.io/?url=http://localhost:3000/swagger.json )
28+ You should now be able to go to [ localhost:3000/states] ( http://localhost:3000/states ) .
2829
29- ## Deployments
30+ Other URLs:
3031
31- ``` bash
32- npm run build
33- npm run cluster-build
34- ```
32+ * Paged: [ localhost:3000/states?limit=10 ] ( http://localhost:3000/states?limit=10 )
33+ * Individual: [ localhost:3000/states/ny ] ( http://localhost:3000/states/ny )
34+ * Search: [ localhost:3000/states/search?term=new ] ( http://localhost:3000/states/search?term=new )
35+ * Swagger: [ petstore.swagger.io/?url= http://localhost:3000/swagger.json ] ( http://petstore.swagger.io/?url=http://localhost:3000/swagger.json )
You can’t perform that action at this time.
0 commit comments