dangdungcntt / actions-logger

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

actions logger

Install dependencies

npm install

Prepare .env file

cp .env.sample .env

Prepare database

collection: actions

indexes:

{"id": 1}
{"text": 1}
{"text": "text"}

Run

node index.js

Create user

curl -X POST \
  http://localhost:3000/api/auth/register \
  -d '{
	"username": "<username>",
	"password": "<password>",
	"token": "<admintokenkey>"
}'

Build Docker Image

docker build -t <image_name>:<tag> .

Docker Run

docker run -d --name actions_logger \
    -e APP_PORT=3000 \
    -e JWT_KEY=jwtsecretkey \
    -e JWT_TTL=2592000000 \
    -e ADMIN_TOKEN=admintokenkey
    -e MONGODB_URI=<mongodb_uri_here>
    --restart always \
    <image_name>:<tag>

About


Languages

Language:JavaScript 62.9%Language:CSS 21.3%Language:HTML 15.5%Language:Dockerfile 0.3%