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
L300-2A-Configure and Deploy Service Delivery and Automation
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删除 查看此书详细信息请在...
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删除 查看此书详细信息请在...
"NCC NCCLOUD deploy"是这样一款工具,专用于NCC(可能代表某种云计算平台或服务)的部署,其版本为v3,意味着这是该工具的第三个主要版本,通常伴随着性能优化、功能增强和用户体验的改进。 "deploy部署工具v3"很...
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 ...
他们的演讲题目分为两部分,第一部分由彭麟来介绍CloudFoundry的架构,后面一部分由EMC颜开来介绍一下Openstack的部署,他们在上海交大做了很多的合作,颜开还会有一个五分钟的视频演示,讲述如何把CloudFoundry部署...
Design and Deploy Production Ready Software》的知识点解析 #### 一、书籍概述 《Pragmatic Bookshelf - Release It! Design and Deploy Production Ready Software》是一本专注于帮助软件开发者设计和部署生产...