Work in progress
git clone git@github.com:hivewallet/hive-js.git
cd hive-js
npm install
brew install couchdb
Enable CORS
add the following config in /usr/local/etc/couchdb/local.ini
:
[httpd]
enable_cors = true
[cors]
credentials = true
origins = http://localhost:8080
headers = accept, authorization, content-type, origin
If you want to be able to access the app from a mobile device on your local network, remember to add your host machine IP or alias to the cors origins list.
origins = http://localhost:8080, http://192.168.1.109:8080, http://alice-computer.local:8080
Start CouchDB
# start couchdb upon login
ln -sfv /usr/local/opt/couchdb/*.plist ~/Library/LaunchAgents
# kick it off
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.couchdb.plist
open http://127.0.0.1:5984/_utils/index.html
Click on the bottom link "fix this" to create an admin user, say:
username: admin
password: password
DB_HOST=127.0.0.1 DB_PORT=5984 DB_USER=admin DB_PASSWORD=password COOKIE_SALT=secret PROXY_URL=https://hive-proxy.herokuapp.com npm run dev
open http://localhost:8080
This project has js & css live reload setup. If you wish to use it to boost your productivity, head over to chrome store and download the LiveReload extension. After turning it on, you'd never need to hit the refresh button anymore.
- Fork the repo
- Push changes to your fork
- Create a pull request
# run both server and client tests
DB_HOST=127.0.0.1 DB_PORT=5984 DB_USER=admin DB_PASSWORD=password COOKIE_SALT=secret npm test
# just server
DB_HOST=127.0.0.1 DB_PORT=5984 DB_USER=admin DB_PASSWORD=password COOKIE_SALT=secret npm run test-server
# just client
npm run test-client