Skip to content

An opinionated starter kit for my projects, with Quasar 1.0 and HapiJS

Notifications You must be signed in to change notification settings

gregory-latinier/quasar-starter-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quasar-starter-kit

Greenkeeper badge

An opinionated starter kit for my projects, with Quasar 1.0 and HapiJS

Install instructions

The project uses yarn. Refer to its documentation to install it.

Install lerna
yarn global add lerna
Install dependencies of all the packages

This will bootstrap all the projects of the monorepo

yarn
lerna bootstrap
Setup the database

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://...
JWT Secret

Change the JWT secret in the same API .env file.

JWT_SECRET=MyS3cR3t
Add some sample data

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!

Reverse proxy

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

Let's roll

In the root package run

yarn dev

The client and admin apps should open.

Happy developing!

Roadmap

  • Client app: edit profile example
  • Sample micro service using the database package

About

An opinionated starter kit for my projects, with Quasar 1.0 and HapiJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published