JsWeb comes with a powerful command-line interface (CLI) that helps you manage your application. You can use the CLI to create new projects, run the development server, manage database migrations, and more.
This command starts the development server.
jsweb run--host: The host to bind to. Defaults to127.0.0.1.--port: The port to listen on. Defaults to8000.--reload: Enable auto-reloading. The server will restart whenever you make changes to your code.--qr: Display a QR code for accessing the server on your local network.
This command creates a new JsWeb project with a standard directory structure.
jsweb new myprojectThis will create a myproject directory with all the necessary files to get you started.
This command is used to manage your database migrations with Alembic.
This command generates a new migration script based on the changes to your models.
jsweb db prepare -m "A short message describing the changes"This command applies all pending migrations to the database.
jsweb db upgradeThis command reverts the last applied migration.
jsweb db downgradeThis command creates a new admin user for the built-in admin interface.
jsweb create-adminYou will be prompted to enter a username, email, and password for the new admin user.