Small API project using Nestjs and Postgres. API has several endpoints:
- returns list of all covered countries;
- returns public holiday dates for given country and year.
- return specific day status for given country.
There will be a further improvements of this API:
- will be added one more endpoint, where it returns longest in row holidays (freedays and holidays) for given country and year
- furher improvements for service logic, error handling and etc.
Project is deployed with swagger on heroku server publicholiday
$ git clone https://github.com/Knijus/public-holidays
$ npm install
3. Install Postgres database on your machine and follow the instalation process
- Default POSTGRES_HOST = 127.0.0.1;
- Default POSTGRES_PORT = 5432;
- User, password and database information use same as during the Postgres instalation.
- ENRICO_SERVICE=https://kayaposoft.com/enrico
- RESPONSE_TYPE=json
- ENRICO_VERSION=v2.0
- ACTION_GET_SUPPORTED_COUNTRIES=getSupportedCountries
- ACTION_GET_HOLIDAYS_FOR_YEAR=getHolidaysForYear
- ACTION_IS_WORK_DAY=isWorkDay
- PUBLIC_HOLIDAY=public_holiday
- WORKDAY=workday
- FREEDAY=freeday
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
- Author - Justinas Kniukšta