Skip to content

Commit

Permalink
Merge pull request #197 from devsapp/fastify
Browse files Browse the repository at this point in the history
Fix nginx demo issue
  • Loading branch information
loganhz authored Jul 1, 2024
2 parents 9eaab30 + 2fb3951 commit 1ae010b
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion web-framework/nginx-reverse-proxy/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Edition: 3.0.0
Type: Project
Name: nginx-reverse-proxy
Version: 0.0.8
Version: 0.0.9
Provider:
- 阿里云
Description: 本案例快速部署一个 Nginx 项目到阿里云函数计算 FC。
Expand Down
5 changes: 2 additions & 3 deletions web-framework/nginx-reverse-proxy/src/code/start.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env bash

sed -i 's\${PROXY_PASS}\'$PROXY_PASS'\g' ./nginx.conf
nginx -c /code/nginx.conf -g "daemon off;"

sed -i 's\${PROXY_PASS}\'$PROXY_PASS'\g' ./nginx.conf
/opt/bin/nginx -c /code/nginx.conf -g "daemon off;"
2 changes: 1 addition & 1 deletion web-framework/nginx/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Edition: 3.0.0
Type: Project
Name: start-nginx-v3
Version: 0.0.12
Version: 0.0.13
Provider:
- 阿里云
Description: 本案例快速部署一个 Nginx 项目到阿里云函数计算 FC。
Expand Down
2 changes: 1 addition & 1 deletion web-framework/nginx/src/code/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# nginx -c /code/nginx.conf -g 'daemon off;'
# /opt/bin/nginx -c /code/nginx.conf -g 'daemon off;'

events { worker_connections 1024; }
http {
Expand Down
2 changes: 1 addition & 1 deletion web-framework/nginx/src/s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resources:
instanceConcurrency: 100
customRuntimeConfig:
command:
- nginx
- "/opt/bin/nginx"
- "-c"
- "/code/nginx.conf"
- "-g"
Expand Down
2 changes: 1 addition & 1 deletion web-framework/nodejs/express/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Edition: 3.0.0
Type: Project
Name: start-express-v3
Version: 0.0.14
Version: 0.0.15
Provider:
- 阿里云
Description: 本案例是将 Express 框架,这一基于 Node.js 平台的极简且灵活的 web 应用开发框架,快速创建并部署到阿里云函数计算 FC 。
Expand Down
2 changes: 1 addition & 1 deletion web-framework/nodejs/express/src/code/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ app.all("/*", (req, res) => {
res.send(
JSON.stringify({
msg: "Hello, World! ",
reqeust: {
request: {
query: req.query,
path: req.originalUrl,
data: req.body,
Expand Down
2 changes: 1 addition & 1 deletion web-framework/nodejs/fastify/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Edition: 3.0.0
Type: Project
Name: start-fastify-v3
Version: 0.0.1
Version: 0.0.2
Provider:
- 阿里云
Description: 本案例是将 Fastify 框架,这一基于 Node.js 平台的极简且灵活的 web 应用开发框架,快速创建并部署到阿里云函数计算 FC 。
Expand Down
2 changes: 1 addition & 1 deletion web-framework/nodejs/fastify/src/code/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fastify.all("/*", {}, async function (request, reply) {
.header("my-custom-header", "hello")
.send({
msg: "Hello, World! ",
reqeust: {
request: {
query: request.query,
path: request.url,
data: request.body,
Expand Down
2 changes: 1 addition & 1 deletion web-framework/python/flask/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Type: Project
Name: start-flask-v3
Provider:
- 阿里云
Version: 0.0.15
Version: 0.0.16
Description: 本案例将Flask框架,这一非常受欢迎的Python Web框架,快捷创建并部署到阿里云函数计算 FC。
HomePage: https://github.com/devsapp/start-web-framework
Organization: 阿里云函数计算(FC)
Expand Down
2 changes: 1 addition & 1 deletion web-framework/python/flask/src/code/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def hello_world(path):
response = jsonify(
{
"msg": "Hello, World!" + " at " + arrow.now().format("YYYY-MM-DD HH:mm:ss"),
"reqeust": {
"request": {
"query": str(request.query_string, "utf-8"),
"path": path,
"data": str(request.stream.read(), "utf-8"),
Expand Down

0 comments on commit 1ae010b

Please sign in to comment.