A basic boilerplate for incept.
Copy .env.sample to ./env, then run the following commands in terminal.
$ yarn
$ yarn generate
$ yarn push
$ yarn populate
$ yarn developyarn- Install node module dependenciesyarn generate- Generates@stackpress/.inceptbased onschema.ideayarn push- Creates example database tablesyarn populate- Populates example databaseyarn develop- Starts the example development server
Goto http://localhost:3000/auth/signin and login with admin/admin.
The following utilities are available per block and follow a common
pattern of yarn [block]:[migrate|test|dev|live] [?event] [...params].
The following are example commands.
$ yarn develop
$ yarn emit
$ yarn generate
$ yarn migrate
$ yarn populate
$ yarn purge
$ yarn push
$ yarn query
$ yarn test$ yarn developStarts the development server
$ yarn emit [event-name] [?data]Emits an event. For example, you can query the profile table using the following command.
$ yarn emit profile-search take=1$ yarn generateGenerates client code
$ yarn migrateMigrate creates a migrations folder in the [block] folder and
generates an SQL file based on the development database only.
It does not push these changes to the database.
$ yarn populatePopulates database defined in src/modules/util/populate.ts
$ yarn purgePurges database.
Use a combination of purge/populate to reset the data inside the database.
$ yarn pushPushes schema changes to the database.
$ yarn query [query]Queries the database. For example, you can query the profile table using the following command.
$ yarn query "SELECT * from profile"$ yarn testTests are automatically generated, but you can add special tests in the
tests folder.