• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

benawad/create-graphql-api: Set up a Typescript GraphQL API by running one comma ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

benawad/create-graphql-api

开源软件地址(OpenSource Url):

https://github.com/benawad/create-graphql-api

开源编程语言(OpenSource Language):

TypeScript 65.7%

开源软件介绍(OpenSource 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




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
naihe138/GraphQL-demo: 发布时间:2022-06-22
下一篇:
arackaf/mongo-graphql-starter: Creates a fully functioning, performant GraphQL e ...发布时间:2022-06-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap