The basic setup for web only work is:
8.1
and higher. Make sure that NPM
is at least version 5.0
.npm install -g yarn
.For complete development environment setup on MacOS, follow:
MacOS Developer Setup for React, React Native, Node and Cassandra Development.
In order to set up the project locally, perform the following steps:
Action | Notes |
---|---|
git clone https://github.com/codefoundries/UniversalRelayBoilerplate |
Clone from github. |
yarn |
Install node packages. |
yarn setup-local |
Set up default configuration for running the boilerplate. |
yarn update-default-persister memory |
Optional - if you wish to try it without Cassandra, use this command to switch to an in-memory persister. |
In addition to the above, you might want to specify JWT_SECRET
by modifying the .env
file. This step can be skipped if you do not care about the actual security and simply want to get the project running.
In order to use the URB tools, set export URB_HOME="/<your local folder for URB>/urb"
in etc/profile
.
In order to develop, three servers need to be started: web server, webpack server, React Native packager. This can be done with one command: yarn dev
. Alternatively, if you need to develop only for the web you can use yarn devw
which only starts the web and webpack servers.
To open the app:
http://localhost:26005
, or whatever IP was assigned when running yarn update-ip
or after installation.To run the iOS app in the emulator:
yarn update-ip
.react-native run-ios
./.env
, or use the defaults. The defaults are:CASSANDRA_CONNECTION_POINTS=localhost
CASSANDRA_KEYSPACE=urb
yarn update-default-persister cassandra
.yarn setup-database
.cd units/urb-persister-dynamodb
.docker-compose up
in a new terminal to start up a local dynamo db (or start it via docker Kitematic).yarn update-default-persister dynamodb
.Instructions for other databases will be added as support for those is added.