sinatra-graphql starter kit
This is an opinionated skeleton app that uses Sinatra, Trailblazer, Apollo as a GraphQL client and of course React
How to run it
Install the ruby dependencies:
bundleInstall the JS dependencies
npm installor
yarn installor
pnpm installor whatever floats your boat.
Then set up the ENV vars
cp .env.sample .envand change the sample to what applies to your project/machine
GRAPHQL_URL="http://localhost:5000/graphql"
DATABASE_NAME="todo-sinatra"
DATABASE_USER="lucas"
DATABASE_PASSWORD="security"
DATABASE_HOST="localhost"
DATABASE_PORT="5432"once all the dependencies are installed you can either run
./bin/serverif you have foreman installed, otherwise you can open 2 terminals and run:
bundle exec unicorn -p 5000 -E "development" -c config/unicorn.rband
npm run webpack:devon each one.