To start everything, run yarn
and then open 2 terminals:
one with npm run dev
(or adonis serve --dev --debug
)
the other for npm run babel:watch
(or babel appFlow --watch -d app
).
When you make changes in any appFlow
file (like adding new types or something) babel transpile it in to app folder, where adonis serve see changes, grab them and reload itself.
Please see this post for more information. Original implementation concept by @Dionid for original implementation and checkout the flow/static type checking adonis conversation here
There are a few things that can be done to make this work a lot better:
- Investigate the use of
babel-node
for development (as opposed to running two commands) - More/better examples. Potentially flowify an existing adonis starter
- As per facebook/flow/issues#7014, implement some sort of module-resolver for resolving paths with the
use()
keyword in.flowconfig
- Look at static typing for adonis 5 and if it fits, figure out the best way to leverage whatever typing sysem is used for better compatibility.
This is the fullstack boilerplate for AdonisJs, it comes pre-configured with.
- Bodyparser
- Session
- Authentication
- Web security middleware
- CORS
- Edge template engine
- Lucid ORM
- Migrations and seeds
Use the adonis command to install the blueprint
adonis new yardstick
or manually clone the repo and then run npm install
.
Run the following command to run startup migrations.
adonis migration:run
To start everything working you need to open 2 terminals:
one with npm run dev (or adonis serve --dev --debug) the other for npm run babel:watch (or babel appFlow --watch -d app).
npm run babel:watch npm run dev