Code Monkey home page Code Monkey logo

tencent-meme-scf's Introduction

English | Live demo!

快速开始

Clone 这个 repo。从 repo 的根目录,您可以拉取我们预先配置的 dev Docker image 并登录进去。请见国内的 Docker hub 镜像

$ git clone https://gitee.com/secondstate/tencent-meme-scf
$ cd tencent-meme-scf

$ docker pull secondstate/tencent-tensorflow-scf
$ docker run --rm -it -v $(pwd):/app secondstate/tencent-tensorflow-scf
(docker) $

你不一定要使用我们的 Docker image。要在您自己的计算机或容器上构建,请确保您已经安装了Serverless 框架, Rust, 和ssvmup.

在 Docker 容器中运行以下命令,以构建和部署整个应用程序。

(docker) $ cd /app
(docker) $ sls deploy
... ...
  website:       https://sls-website-ap-hongkong-kfdilz-1302315972.cos-website.ap-hongkong.myqcloud.com
  vendorMessage: null

63s › tencent-meme-scf › "deploy" ran for 3 apps successfully.

在浏览器中加载网站 URL,就开始使用函数来产生图片啦。

在**大陆,如果 GitHub 很慢,可以用我们在 Gitee 的镜像。git clone https://gitee.com/secondstate/tencent-meme-scf.git

创建你自己的云函数

Fork 这个 repo,使用 Code | Open with Codespaces 按钮来在浏览器中打开 Github Codespaces IDE 。第一次启动时,需要花费几分钟。

低代码开发

一旦 Codespaces IDE 启动了, 你就可以根据自己的应用程序需求来对源代码进行修改,自定义函数。

  • src/main.rs 文件中更改图片产生的逻辑。
  • website/content/index.html 文件中对前端UI进行更改。

创建

在 Codespaces 打开 Terminal 窗口, 然后运行下面的命令行来创建云函数。

$ ssvmup build --enable-aot

部署

Terminal 窗口,运行下面的命令行将云函数部署到腾讯云上。

$ cp pkg/scf.so scf/

$ sls deploy
... ...
  website:       https://sls-website-ap-hongkong-kfdilz-1302315972.cos-website.ap-hongkong.myqcloud.com

在浏览器内加载部署好的 URL。 Have fun!

更多

这个 repo 的各个 branches 有不同的 memes

tencent-meme-scf's People

Contributors

alabulei1 avatar juntao avatar

Stargazers

 avatar

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.