Skip to content

PranjalAgni/projecthunt-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a0dca75 Β· Apr 30, 2023

History

61 Commits
Mar 19, 2021
Apr 30, 2023
Feb 28, 2021
Feb 20, 2021
Feb 24, 2021
Mar 2, 2021
Feb 16, 2021
Feb 20, 2021
Feb 16, 2021
Mar 25, 2021
Apr 30, 2023
Apr 7, 2021
Apr 30, 2023
Feb 20, 2021
Feb 24, 2021
Mar 22, 2021
Apr 30, 2023
Mar 29, 2021
Mar 22, 2021

Repository files navigation

ProjectHunt API ✨ 🌻 🌱

Version License: MIT

Setup Locally

  1. Duplicate and rename .env.example to .env and provide all environment var

  2. Provide right DB username,password,schema

Running the server

Without Docker

npm i
npm run watch
  • Open other terminal window and run dev server
npm run start:dev

With Docker

docker-compose up --build

If you get DB does not exists, simply run this:

sh scripts/sh/initdb.sh

Scripts

  1. seed - DB seed script, will insert dummy data
  2. watch - Watcher, for changes in TS files
  3. clean - Removes dist folder
  4. build - Compiles TS files, and spits JS version
  5. start - Start the server in prod mode
  6. start:dev - Start the server in dev mode
  7. lint - Lint the TS files with eslint

HTTPS Support

You can run this api over https now with the help of Caddy reverse proxy

Steps to enable HTTPS:

  1. Download and setup Caddy
  2. Open a new terminal and run caddy run Caddyfile in the root of project
  3. Enjoy API over HTTPS now πŸ‘

In future will move Caddy to Docker, so we dont need to install it seperately

Contributions are welcome ⚑

Drop a pull request, and we will review and bring it to master

Show your support

Give a ⭐️ if this project helped you!

About

API for projecthunt a project hunting platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages