Coder Social home page Coder Social logo

projecthunt-api's Introduction

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!

projecthunt-api's People

Contributors

pranjalagni avatar rajatgurung avatar

Stargazers

Meghraj avatar Saheb Giri avatar Amit Chaudhari avatar

Watchers

James Cloos avatar  avatar Aman Sharma avatar

Forkers

rajatgurung

projecthunt-api's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.