$ git clone git@github.com:stellar-fox/shambhala.git
Cloning into 'shambhala'...
$ cd shambhala
$ npm i
-
self-signed certificate generation example:
$ openssl req \ -newkey rsa:2048 \ -new -nodes -x509 -days 365 \ -keyout ssl.key -out ssl.cert
-
nginx.conf:
http { # ... server { listen 443 ssl; # ... ssl on; ssl_certificate /path/to/ssl.cert; ssl_certificate_key /path/to/ssl.key; # ... } }
http {
# ...
server {
# ...
location /shambhala/ {
proxy_pass http://127.0.0.1:8080/shambhala/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
proxy_redirect off;
}
location /shambhala/api/ {
proxy_pass http://127.0.0.1:8081/api/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
proxy_redirect off;
}
}
}
In all snippets below replace user
with some value of your choice.
$ sudo -i
# su - postgres
$ createuser user -P
$ ^D
# ^D
$
$ sudo -i
# su - postgres
$ dropdb shambhala
$ createdb shambhala --owner user
$ ^D
# ^D
$
$ cd src/config
$ cp client.example.json client.json
$ vi client.json
Edit domain
for live deployment or non-localhost-only development.
$ cd src/config
$ cp host.example.json host.json
$ vi host.json
Here, instead of "official friendbot", you can configure to use protostar.
$ cd src/config
$ cp server.example.json server.json
$ vi server.json
Put an appropriate values to user
, pass
, host
, port
and db
keys.
$ npm run build:lib
$ npm start
$ npm run devApiServer
$ npm run build:all
dist.client
- shambhala frontenddist.server
- shambhala backenddist.lib
- shambhala client librarydist.host
- shambhala testing host application