fix CVE in react

This commit is contained in:
Ruidy 2022-07-29 01:12:01 +02:00
parent c7e0784905
commit d72f85f9e9
No known key found for this signature in database
GPG key ID: 85530F50B592CC84
12 changed files with 3584 additions and 3263 deletions

View file

@ -5,3 +5,15 @@ Dockerfile examples for:
- Node.js,
- Python,
- React
## Build a container
```shell
docker build -t $APPNAME:$VERSION .
```
## Run a container
```shell
docker run --rm $APPNAME:$VERSION
```

4
elixir/.formatter.exs Normal file
View file

@ -0,0 +1,4 @@
# Used by "mix format"
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
]

26
elixir/.gitignore vendored Normal file
View file

@ -0,0 +1,26 @@
# The directory Mix will write compiled artifacts to.
/_build/
# If you run "mix test --cover", coverage assets end up here.
/cover/
# The directory Mix downloads your dependencies sources to.
/deps/
# Where third-party dependencies like ExDoc output generated docs.
/doc/
# Ignore .fetch files in case you like to edit your project deps locally.
/.fetch
# If the VM crashes, it generates a dump, let's ignore it too.
erl_crash.dump
# Also ignore archive artifacts (built via "mix archive.build").
*.ez
# Ignore package tarball (built via "mix hex.build").
example-*.tar
# Temporary files, for example, from tests.
/tmp/

View file

@ -0,0 +1 @@
IEx.after_spawn(fn -> Example.hello() |> IO.puts() end)

7
elixir/Dockerfile Normal file
View file

@ -0,0 +1,7 @@
FROM elixir:latest
WORKDIR /app
COPY . .
RUN iex -s mix

21
elixir/README.md Normal file
View file

@ -0,0 +1,21 @@
# Example
**TODO: Add description**
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `example` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:example, "~> 0.1.0"}
]
end
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at <https://hexdocs.pm/example>.

18
elixir/lib/example.ex Normal file
View file

@ -0,0 +1,18 @@
defmodule Example do
@moduledoc """
Documentation for `Example`.
"""
@doc """
Hello world.
## Examples
iex> Example.hello()
:world
"""
def hello do
:world
end
end

28
elixir/mix.exs Normal file
View file

@ -0,0 +1,28 @@
defmodule Example.MixProject do
use Mix.Project
def project do
[
app: :example,
version: "0.1.0",
elixir: "~> 1.13",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# {:dep_from_hexpm, "~> 0.3.0"},
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
]
end
end

View file

@ -0,0 +1,8 @@
defmodule ExampleTest do
use ExUnit.Case
doctest Example
test "greets the world" do
assert Example.hello() == :world
end
end

View file

@ -0,0 +1 @@
ExUnit.start()

View file

@ -12,7 +12,7 @@ RUN go mod download
COPY . .
RUN go build -o ./out/dist .
FROM alpine
FROM alpine:latest
RUN apk upgrade --no-cache

File diff suppressed because it is too large Load diff