By using OST branded tokens you can set up a token economy inside any site/app/etc. This is a small turn-key project that sets up a Node/Express development server running Apollo GraphQL so that you can ignore all the back end work while getting started developing front end services.
GraphQL allows for your front end service to ask for exactly what information it wants, and get a clean response. Apollo has written some very nice documentation on how to use GraphQL from React, Vue, Angular, plain JS, etc. Give it a look when you are ready to learn more.
cd ost-graphql-server
vi logic/conf.js # add your OST API keys and Apollo service ID
npm install
npm start
# Server should be running on localhost:<GRAPHQL_PORT>/graphiql!
This server comes with the basic OST APIs, but that is not where the fun stuff happens. This project is set up so you can add your own API functions (resolvers) and types quickly. logic/type-defs.js
contains the type definitions for graphql, where the query and mutation types match the functions found in logic/resolvers.js
. Take a look at logic/apis/ost.js
to get an example of what a sample resolver looks like. Make your own file, add it to logic/resolvers.js
, and then add the matching types to logic/type-defs.js
. Now you have an API -- Easy!
- Get OST Kit API keys from https://kit.ost.com/developer-api-console
- Get an Apollo Engine service key from https://engine.apollographql.com
- Node v8
This is a development project and not meant for serious production use as-is. We are not liable for any outcome from this service, use at your own risk! MIT Licensed.
Visit OST.com to learn more about OST.
Made possible with support from FUTURED
Want to support independent writing with your OST? FUTURED: 0x0e082d72593f8e2B885B0ca61c5da843aefAcfB1