An app for Project Link
The following browsers are actively supported:
- Firefox Nightly for Android
- Chrome Beta for Android
- Safari for iOS 9
Assuming you have git and nvm installed, clone this repo:
$ git clone https://github.com/fxbox/app
$ cd app
And then run:
$ nvm install v4.2.2
$ nvm use v4.2.2
$ npm install -g gulp
$ npm install
$ gulp
Then point your browser to https://localhost:8000 and accept security exception for self-signed development certificate.
By default app is served via https
using self-signed certificate from certs
folder. Certificate is valid for ~100 years and generated with the following
command:
$ openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 36500 -nodes
In case custom certificate is required you can either override respective files
in certs
folder or change certificate and private key paths in webserver
gulp task in gulpfile.js
.
Even though it's not recommended sometimes you may want to switch to http
, for
that purpose just comment out https
config property in webserver
gulp task
in gulpfile.js
. Check out official gulp-webserver module page
for possible options as well. And don't forget to flip it back while running
integration tests as they will still assume that app is run via https
.
Note: The app is built in the dist/app
folder.
Firefox 46 | Firefox Nightly 49 | Chrome 50 | Chrome Canary 51 | Opera | Safari | |
---|---|---|---|---|---|---|
OSX | Working | Working | Coming soon | Coming soon | Coming soon | Not tested |
Linux | Working | Working | Coming soon | Coming soon | Coming soon | |
Windows | Not tested | Not tested | Not tested | Not tested | Not tested | |
Android | Not working | Coming soon | Coming soon | Coming soon | Coming soon | |
iOS | Not tested |
There are a couple of steps that you must do in order to have push notifications working. As they rely on Service Workers, make sure you follow the next steps:
- Push Notification will need HTTPS everywhere, so be sure your
foxbox
is running over SSL. - Visit
https://knilxof.org:4443/ping
and add a permanent exception for the certificate. - When developing locally (https://localhost:8000) add permanent exception for the self self-signed certificate.
- To start over with a new test, clean the web push database in the foxbox:
rm -rf $HOME/.local/share/foxbox/webpush.sqlite
and start a Firefox instance with a new profile<path to firefox bin> --profile /tmp/<random>
. - If you want to perform multiple tries with same profile try to use a service
like
xip.io
. Where you can have different names pointing to your local ip likehttps://myname.<my local ip>.xip.io:8000
for using this, remember to launch your gulp task likeHOST=<my local ip> gulp
. Doing this you are creating different origins, which will make you receive multiple notifications (as many as app origin registered).
Run npm test
.
Steps (to be scripted soon):
- Clone foxbox
- Run it with
cargo run
- With a browser, perform the first time setup by going to http://localhost:3000
- Run
gulp test-e2e
Generate documentation from the source code with:
$ gulp doc