Code Monkey home page Code Monkey logo

hello-mongo's Introduction

Vapor 应用开发说明

Vapor 是基于 Swift 编程语言而开发的最流行的 Web 网络框架,这是一种更先进、强大且类型安全的编程语言。通过 Vapor,你可以使用 Swift 编写后端、Web 应用 API 或 HTTP 服务,与传统的服务器语言相比具有许多优点。

阿里云函数布局

  • 通过 NPM 安装最新版本的 Serverless Devs 开发者工具:
npm install -g @serverless-devs/s
  • 通过config命令进行密钥等信息的配置:-f 强制覆盖密钥信息
s config add \
--AccessKeyID ${ACCESSKEYID} \
--AccessKeySecret ${ACCESSKEYSECRET} \
--access fc-access \
-f
  • 初始化项目
s init start-vapor -d start-vapor
  • 开始部署
cd start-vapor && s deploy -y -t ./s.yaml -a fc-access --use-local
  • 参数解析
-t 指定 s.yaml 文件
-a 指定秘钥
--use-local 优先使用本地配置进行部署
-y 在交互时,默认选择y

按镜像部署函数(写自己的镜像地址)

export imageurl="registry-xxx.cn-hongkong.aliyuncs.com/xxx/fc-vapor:$(date +%F-%H-%M-%S)"

s deploy -t ./s.container.yaml -a fc-access --use-local -y

按二进制部署

s deploy -t ./s.yaml -a fc-access --use-local -y

参考

https://docs.serverless-devs.com/fc/command/deploy

https://docs.serverless-devs.com/serverless-devs/cicd

hello-mongo's People

Watchers

 avatar

Forkers

xsahxl

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.