Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 818 Bytes

README.md

File metadata and controls

42 lines (32 loc) · 818 Bytes

ShorterLinker

A free short link service. Site : http://sl.ayang818.top

Dependencies

  1. TypeScript
  2. node
  3. MySQL
  4. Redis
  5. Docker

How to run

Install typescript

npm install -g typescript

Install necessary dependencies

npm install

Before running, make sure you have already started a MySQL Server(and created a database for this project) and a Redis Server.

Execute db.sql in your MySQL.

Run with node

npm run serve

Run with docker

Build a docker image

docker build -t imageName:version .

Run a docker container

docker run -d --name myapp -p 3000:3000 -e REDIS_HOST=xxx -e REDIS_PASS=xxx -e REDIS_PORT=xxx -e MYSQL_HOST=xxx -e MYSQL_PORT=xxx -e MYSQL_USER=xxx -e MYSQL_PASSWORD=xxx -e MYSQL_DB=xxx imageName:version