An opinionated starter kit for my projects, with Quasar 1.0 and HapiJS
The project uses yarn. Refer to its documentation to install it.
yarn global add lerna
This will bootstrap all the projects of the monorepo
yarn
lerna bootstrap
I'm using mongodb. The easiest way to setup your development environment is to create a free database with a provider, such as mLab. Follow the instructions and add the mongo database url in the API .env file.
MONGODB_URI=mongodb://...
Change the JWT secret in the same API .env file.
JWT_SECRET=MyS3cR3t
In the folder https://github.com/gregory-latinier/quasar-starter-kit/tree/develop/packages/database/sample-data you will find some users to init your database for test
The default password used is azerty01
Remember don't use this data for production!
As both admin and client webapp use the same domain, localhost, you won't be able to develop both apps at the same time unless you use a reverse proxy because the access token is stored in a cookie.
A way to fix this is is to use nginx for example.
Here is a sample conf
server {
client_max_body_size 4G;
listen 80;
server_name dev.qsk.com;
location / {
proxy_pass http://localhost:8080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Include this in your nginx.conf, replace the server name with your domain. Update your host file with
127.0.0.1 dev.qsk.com
127.0.0.1 dev.admin.qsk.com
127.0.0.1 dev.api.qsk.com
In the root package run
yarn dev
The client and admin apps should open.
Happy developing!
- Client app: edit profile example
- Sample micro service using the database package