CLI Toolbelt
Last updated
Was this helpful?
Last updated
Was this helpful?
Adding your own features is as simple as spinning up a new model, view and controller. Gravity comes with a CLI toolbelt that you can use to generate the files needed for this automatically.
This will create:
a new model template in /model
directory
a new controller template in the /controller
directory that handles the server request and calls the appropriate model method
a new set of endpoints in /api
to route the request to your controller methods
a React view in /client/src/views
that makes the API request
If you don't want to create a database table or a React view then you can omit the -db
and -ui
parameters.
You can automatically create a new React component and import it into the component library using the following command in the terminal:
The toolbelt can also execute a series of to test your application rigorously.
If you want to create a new master account for , you run the following command: