Skip to content

Snapaper/snapaper-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Sep 20, 2024
94435c5 · Sep 20, 2024

History

24 Commits
Nov 22, 2022
Jul 17, 2024
Feb 29, 2024
Nov 22, 2022
Nov 22, 2022
Nov 11, 2022
Nov 11, 2022
Nov 22, 2022
May 5, 2020
Jun 7, 2024
Sep 20, 2024
Feb 29, 2024
Sep 20, 2024
Jul 17, 2024
Feb 29, 2024

Repository files navigation

Snapaper Node.js

The Node.js Back-End of Snapaper


Dependencies

  • Node-Crawler
  • Express
  • Express-Generator

Development

git clone [email protected]:Snapaper/snapaper-nodejs.git

Make sure Node.js has been installed before you continue. See Dockerfile for recommended Node.js environment version.

We use pnpm for development and yarn in production environment:

pnpm/yarn install

By default, the API service will be listening on port 8080. To change this behaviour, modify environment variable PORT.

pnpm/yarn run start

Deployment

Redis

We use Redis to cache API responses. Currently, we use a remote Redis database service provided Upstash.


Docker image

Build Docker image:

docker build --tag=snapaper-nodejs .

Deploy to Fly

Deploy with Fly.io:

fly launch
fly deploy

Scale to 2 instances:

fly scale count 2