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

juffalow/express-graphql-example: Example project how to use Express and GraphQL

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

开源软件名称(OpenSource Name):

juffalow/express-graphql-example

开源软件地址(OpenSource Url):

https://github.com/juffalow/express-graphql-example

开源编程语言(OpenSource Language):

TypeScript 97.2%

开源软件介绍(OpenSource Introduction):

Express, GraphQL example

License codecov

out

How to run the project using Docker

docker-compose up --build

Open GraphiQL in your browser http://localhost:3010/graphql

How to run the project

Install dependencies:

yarn

# or using npm

npm install

Create src/config.ts or rename src/config.example.js and update file with your credentials:

export default {
  port: 3010,
  database: {
    type: 'mysql',
    connection: {
      database : '',
      host : '',
      password : '',
      user : '',
    },
    /*
     * Migrations run on every start of the application.
     * If you initialized the database manually (from the database.sql file),
     * you don't need this.
     */
    migrations: {
      directory: __dirname + '/migrations',
    },
  },
};

Run the project:

yarn start

# or using npm

npm start

Open GraphiQL in your browser http://localhost:3010/graphql

Examples

You can find example queries in EXAMPLES.md.

Old version

Here is a link to an old version, that used sequelize and did not use connections:

Here is a link to older version, that did not use typescript, and used buildSchema method and graphql schema file:

License

MIT license




鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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