Skip to content

Turbotailz/api.manchas.cat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api.manchas.cat

A ridiculously over-engineered API for my cat.

Features

  • CDN manager
  • REST(ish) API to retrieve and add images
  • Discord bot with commands

Installation instructions

To run your own version of this API, you'll first need some things installed:

Requirements

  • NodeJS - at least version 16.6 with
  • KnexJS - for database migrations and seeding
  • PostgreSQL - although MySQL may work as well (untested)
  • S3 bucket - to store the images
  • Some seriously cute pics of your pet - uwu

Optional

  • A Discord bot - Only if you wish to make use of Discord features
  • Yarn - But you can use NPM, knock yourself out
  • pm2 - An amazing process manager which helps keep the application running forever, but you can use your own system if you need

Installation steps

This guide assumes you have set up the above requirements.

  1. Clone this repository to somewhere you plan to run the API. Or download this repository as a .zip and extract it.
git clone https://github.com/Turbotailz/api.manchas.cat
  1. Navigate to the application directory and install the dependencies with yarn install or npm install
  2. Copy .env.example to .env
  3. Edit .env with all the necessary information
  4. Run the migration script to create the database tables
knex migrate:latest
  1. If you would like to bulk seed a set of prepared images, place them in the database/seeds/images folder
  2. Edit database/seeds/02_users.js to include your own user (if you wish to enable POST and DELETE requests)
  3. Run the seed command
knex seed:run
  1. The application should be ready to start now
yarn start
# or
npm start

Troubleshooting

You will likely run into issues trying to set this up. My installation guide was pretty brief because I am very lazy. Please do let me know in the issues section if you come across any problems, so I can document them here :)

Contributing

Please do xo

Just make sure you run eslint before committing please!