JamesG Trading is a platform developed by James Gallagher that facilitates and processes investments in him, as a publicly traded person.
After installation, you can query the API by using the GraphQL endpoint through the method listed in the documentation above, or you can use the GraphiQL enviornment which is a query crafting tool. GraphiQL allows you to easily create and run queries, as well as view the internal docs for the API.
GraphQL Endpoint - https://localhost:3000/graphql GraphiQL Endpoint - https://localhost:3000/graphiql
You can view comprehensive documentation for this API by visiting the GraphiQL endpoint and selecting the "Docs" panel.
git clone https://github.com/jamesgallagher432/jamesg-trading-api.git
Create environment file
In order for the server and client to know how to call the API used in this project, you need to complete this file. We've included a
.env.example file that you can rename to get started with the default values.
cp .env.example .env
rake db:seed Running this command will create an admin user and populate the trades table, and is necessary for the app to work correctly.
Run development server
npm run start
Your app will be served at: http://localhost:3000/graphql
You can deploy this application on Heroku by using the above link, or run it on your local machine using the instructions above.
The deploy script is now totally automated and will hook into the server-rendering automatically. Running
npm run serve:bundle will set your environment to production and serve these files via Express. Also, a Procfile is included, which will run the Express server on Heroku when you push your code.
This project makes use of the GraphiQL interface for easy query testing and is automatically disabled in production mode. To make queries to this API, you can either use the GraphiQL interface, or the GraphQL endpoint.
Featured below is the database structure for this project. This project makes use of PostgreSQL hosted on Heroku as the database environment. Please note that any "reference" links which are listed in the type column are there for API reference only, and are foreign keys in the database.
This project is licensed under the MIT License - see the LICENSE.md file for details
Thank you to the Scalable React Boilerplate community for developing such a useful and swift starting point for building an application with React, Grommet, and GraphQL. This README includes content from the Scalable React Boilerplate to make it easy for you to understand how to get started with this project.
Thanks to Mike Merrill, the world's first publicly traded person, for providing me with advice on how to execute this project, and being a true inspiration to me.