Application of the melon protocol portal.
-
Clone this repository
git clone git@github.com:melonproject/portal.git cd portal
-
Install dependencies:
meteor npm install
After installation is complete
Go to the above portal
directory, open a terminal and launch meteor:
npm start
To run the chimp tests, you need to have a Meteor & testrpc instances running. To do this, open 3 terminal windows and run the following commands in each window:
npm start
npm run testrpc
npm run test:chimp:watch
to only run tests annotated with '@watch' ornpm run test:chimp:once
to run all chimp tests (can take some time) just once.
If you have your own Ethereum client running locally on http://localhost:8545, I strongly suggest that you pause it as long as the tests run.
We use Facebook's Jest for Unit Testing. Run all Jest-Tests with:
npm run jest
(You do not have to install Jest globally on your machine).
During development, I recommend watching the changed files in the background and test them when changed automatically with
npm run jest:watch
If you have troubles running the watch command with the following error:
Error: Error watching file for changes: EMFILE
Try install Watchman with:
brew install watchman
(Thanks to Colin Witkamp / robzolkos)
Deployment is on Meteors Galaxy. There are two types of possible deployments:
- Full deployments (as in dev mode / stage / one sync service for live): Server syncs with blockchain. Vertical scale.
- Webfront: Server does not sync with the blockchain. Horizontal scale.
The idea is to have only one full instance (ie. container) running which scales vertically (more CPU/RAM) and multiple webfront instances to scale horizontally.
Deploy the live system with:
npm run deploy:sync
npm run deploy:webfront
Deploy the stage system with:
npm run deploy:stage
Everyone is free to host & run this portal elsewhere. All the important data is synced from the blockchain.