Git Product home page Git Product logo

create-graphql-api's Introduction

create-graphql-api

npx create-graphql-api my-api
cd my-api
npm start

Example

Basic: https://www.youtube.com/watch?v=WhzIjYQmWvs

Auth: https://www.youtube.com/watch?v=OVdPOExxKuU

Templates

You can do the following for an auth template:

npx create-graphql-api my-api --auth

How to Deploy to Heroku

  1. Make sure you have Git setup
  2. Setup Heroku CLI: https://devcenter.heroku.com/articles/getting-started-with-nodejs#set-up
  3. Create a Procfile in the root folder of your project and put the following in it:
web: node dist/index.js
  1. In your package.json add the following script to run the TypeScript compiler before Heroku runs your project:
"heroku-postbuild": "tsc"
  1. In the root folder of your project, use the Heroku CLI to create a new project:
heroku create
  1. Add a PostgreSQL database addon
heroku addons:create heroku-postgresql
  1. Commit your code and push to Heroku
git push heroku master

Note: You'll want to look at your ormconfig.js and configure the options you want for production.

Also see this video on how you can deploy to Digital Ocean with Dokku: https://www.youtube.com/watch?v=AdHwBKKQHZ4

create-graphql-api's People

Contributors

benawad avatar sirluky avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.