restful api to demonstrate whether a date is chinese holiday
/api/today
/api/yesterday
/api/tomorrow
/api/<date-format>
/api/2022-06-01
/api/20220601
1
: day off0
: work day
config rules with yaml
file under data
folder with format ${YEAR}.yaml
or {YEAR}.yml
current year is 2022.yaml
, next year will be 2023.yaml
- clone this repo
- install node.js >= v12.0.0
- install dependencies:
npm install
- generate database:
npm run init
- dev:
npm run dev
docker build -t dayoff .
docker run -p 7001:7001 -d dayoff