Setup a local environment
Working with Blisache locally requires you have registered and activated your domain. In this example I will create the subdomain dev.blisache.com and I will activate this subdomain by setting the blisache-provided activation key in the DNS TXT records for my new subdomain. Domain activation can take some time because DNS records needs to propagate. You can replace every occurence of dev.blisache.com with your own domain.
Your registered domain and the domain serving your pages must match. Also you need to serve over SSL to enable a secure context when nagivating with the browser. Your browser will most likely consider self-signed certificates as insecure, therefore you will need to generate a real certificate for your test domain. Of course when running locally you don’t really serve from a domain. We will configure an instance of Nginx as proxy to do so. Install Nginx and add this configuration to /etc/nginx/conf.d/dev.blisache.com.conf :
# /etc/nginx/conf.d/dev.blisache.com.conf
server {
listen 443 ssl;
server_name dev.blisache.com; # replace with your own domain here
ssl_certificate /etc/letsencrypt/live/dev.blisache.com/fullchain.pem; # replace with your own cert path
ssl_certificate_key /etc/letsencrypt/live/dev.blisache.com/privkey.pem; # replace with your own key path
location / {
proxy_pass http://localhost:8888; # replace with your own port here
}
}
Don’t forget to restart your nginx instance.
Finally you have to configure a local DNS resolution so that your test domain resolves to your local machine. This is acheived with your hosts file /etc/hosts :
# /etc/hosts
127.0.0.1 localhost dev.blisache.com
Now my app is served at the url https://dev.blisache.com and is ready to start testing and integrating the Blisache API.