This commit is contained in:
Ruidy 2021-09-23 21:27:09 +02:00
parent 554116edbc
commit 0efdda90de
4 changed files with 15 additions and 8 deletions

View file

@ -1,6 +1,6 @@
module go-app
go 1.16
go 1.17
require (
github.com/gin-gonic/gin v1.7.3
@ -10,8 +10,17 @@ require (
github.com/mattn/go-isatty v0.0.13 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/ugorji/go v1.2.6 // indirect
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
require (
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/ugorji/go/codec v1.2.6 // indirect
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect
golang.org/x/text v0.3.6 // indirect
)

View file

@ -1,4 +1,4 @@
FROM node:16.6.2-alpine
FROM node:lts-alpine
WORKDIR /app
COPY package.json .
@ -6,5 +6,3 @@ COPY yarn.lock .
RUN yarn install
COPY . .
CMD node index.js

View file

@ -6,10 +6,10 @@ app = FastAPI()
@app.get("/")
def read_root():
def read_root() -> dict:
return {"Hello": "World"}
@app.get("/items/{item_id}")
def read_item(item_id: int, q: Optional[str] = None):
def read_item(item_id: int, q: Optional[str] = None) -> dict:
return {"item_id": item_id, "q": q}

View file

@ -1,4 +1,4 @@
FROM node:15.4 AS build
FROM node:lts-alpine AS build
WORKDIR /app
COPY package.json .