The ReactJS front end to Groupy
- Node 10.16.3
- React 16.13.0
- Material-ui 4.9.5
- Apollo Client 2.6.8
- Webpack 4.41.5
Step 1 - install nodeJS
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
nvm install v10.16.3
Step 2 - install git
- Ubuntu -
sudo apt-get install github
- MacOS -
brew install git
- RedHat/CentOS -
yum install git
- You must have a .env file in the root directory of this repo with the following fields (Example) populated:
REACT_APP_PORTNUM='4000'
REACT_APP_GROUPY_GRAPHQL_SERVER='localhost'
REACT_APP_ENV='development'
Note: Remaining instructions assume your graphQL server is localhost. If this is not the case please substitute the "localhost" values for the server DNS name or IP, IE. REACT_APP_GROUPY_GRAPHQL_SERVER value.
- The groupy Apollo Server instance must be running to provide API endpoints.
- For now, the above token must have been obtained via the mobile app or REST API using a two-step process:
Step 1 - verification
curl -X POST http://localhost:4000/sendVerification/YOUR-PHONE-NUMBER
Where localhost and port 4000 are where you are running your instance of the groupy Apollo Server.
Step 2 - gather your token
curl -X POST http://localhost:4000/verifyPhone/YOUR-PHONE-NUMBER/MYCODE
Please test your code by adding it to the header in the Apollo Server playground like this:
You can test the Apollo Server using a getMe query (per the screenshot)
query getMe {
me {
id
first
last
zipCode
color
initials
profileImage
}
}
Step 3 - start groupy-webapp
Pre-req "setting up developer environment" node ./scripts/start.js
.You should now see the groupy-webapp at this url
http://localhost:4000
simply run these commands:
NODE_ENV=production npm run build`
serve -s build
If you do not have "serve" installed IE. seeing this on Ubuntu
Command 'serve' not found, but can be installed with:
sudo snap install serve
then npm -g install serve
and take a look at http://localhost:5000
to run tests
npm run test
to see coverage
npm run coverage
Noel Miller
github.com/radkin