Jets New Modes
jets new command has 3 different modes: html, api, and job. Use the
--mode option to specify one of them. The modes allow you to generate different starter Jets projects for different needs.
jets new demo --mode html # default jets new api --mode api jets new cron --mode job
Here’s a table that describes the different modes. It briefly covers when it may make sense to use one over the other.
|html||The html mode generates a starter app useful for html web applications. This mode includes webpacker and assets. This article may be of use Jets CRUD Introduction if you’re looking at this mode.|
|api||The api mode is useful for building APIs. This mode does not include webpacker or assets. You may be interested in this article: Build an API with the Jets if you’re looking at this mode.|
|job||The job mode creates a very lightweight project. It is useful when you only need to run just a few Lambda function. It’s a perfect mode if you want something like a Serverless Cron Job with Jets|
No Database Option
A notable option is the
--no-database option. If you have an app that does not require a database, it is useful to have
jets new generate a skeleton app without a database configured. Here’s an example with api mode and no database:
jets new api --mode api --no-database
Refer to the CLI reference jets new for more info.
Pro tip: Use the <- and -> arrow keys to move back and forward.