GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
GraphQL sample codes are in project sales-api.zip.
It is running pretty good with command
> npm run start
To make it working well with Tencent Cloud, I add this app.js
'use strict';
const express = require('express');
const { ApolloServer } = require('apollo-server-express');
const resolvers = require('src/resolver');
const schemas = require('src/schema');
const { getContext } = require('src/context');
const server = new ApolloServer({
typeDefs: schemas,
resolvers,
context: getContext
});
const app = express();
server.applyMiddleware({ app });
module.exports = app
Add this component to make it working on Tencent Cloud:
salesApi:
region: ap-shanghai
component: '@serverless/tencent-express'
inputs:
region: ap-shanghai
functionName: sales-graphql
serviceId: service-qbj6dksl
serviceName: salesgraphql
codeUri: ./
functionConf:
timeout: 10
memorySize: 128
apigatewayConf:
protocols:
- http
environment: prepub
isDisabled: false
Command will deploy that to Tencent
>sls - - debug
References:
https://github.com/serverless-components/tencent-express/blob/master/docs/configure.md
https://yugasun.com/post/serverless-fullstack-vue-practice.html
https://github.com/serverless-components/tencent-scf
分享到:
相关推荐
Learn to deploy your applications, which are compliant with GraphQl and Relay Book Description There’s a new choice for implementing APIs – the open source and Facebook-created GraphQL specification...
Release It! - Design and Deploy Production-Ready Software 2nd,Release It! Design and Deploy Production-Ready Software
The volume also examines how to successfully deploy a cloud application across the enterprise using virtualization, resource management and the right amount of networking support, including content ...
Deploy an OpenStack private cloud to a Hadoop MapReduce environment
Hybrid Cloud for Developers Develop and deploy cost-effective applications on AWS and OpenStack platform with ease 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在...
Hybrid Cloud for Developers Develop and deploy cost-effective applications on AWS and OpenStack platform with ease 英文mobi 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在...
release it! design and deploy production ready software
Docker Containers Build and Deploy with Kubernetes, Flannel, Cockpit, and Atomic 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书
The book begins with the concepts needed to safeguard your credentials and explain how you interact with cloud providers to manage resources. Each chapter begins with an introduction and ...
Hybrid Cloud for Developers Develop and deploy cost-effective applications on AWS and OpenStack platform with ease 英文azw3 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在...
how to prepare and deploy a Java application
It has the potential to impact every aspect of computing, from the application development process to how applications are deployed and scaled up and out across massive data centers. Despite its ...
Hybrid Cloud for Developers Develop and deploy cost-effective applications on AWS and OpenStack platform with ease 英文无水印转化版pdf pdf所有页面使用FoxitReader、PDF-XChangeViewer、SumatraPDF和Fire...
Pragmatic Bookshelf - Release It! Design and Deploy Production Ready Software
Cloud-Native-Python-Build-and-deploy-resilent-applications-on-the-cloud-using-microservices-AWS-Azure-and-more.pdf
Technology professionals who deploy services in the cloud or are thinking of moving to the cloud. Professionals in the DevOps and Cloud services fields need these skills to succeed in their current ...
他们的演讲题目分为两部分,第一部分由彭麟来介绍CloudFoundry的架构,后面一部分由EMC颜开来介绍一下Openstack的部署,他们在上海交大做了很多的合作,颜开还会有一个五分钟的视频演示,讲述如何把CloudFoundry部署...
The volume also examines how to successfully deploy a cloud application across the enterprise using virtualization, resource management and the right amount of networking support, including content ...
Scalable Cloud Ops with Fugue Declare, Deploy, and Automate the Cloud 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 ...