A ridiculously over-engineered API for my cat.
- CDN manager
- REST(ish) API to retrieve and add images
- Discord bot with commands
To run your own version of this API, you'll first need some things installed:
- 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
- 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
This guide assumes you have set up the above requirements.
- 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
- Navigate to the application directory and install the dependencies with
yarn install
ornpm install
- Copy
.env.example
to.env
- Edit
.env
with all the necessary information - Run the migration script to create the database tables
knex migrate:latest
- If you would like to bulk seed a set of prepared images, place them in the
database/seeds/images
folder - Edit
database/seeds/02_users.js
to include your own user (if you wish to enable POST and DELETE requests) - Run the seed command
knex seed:run
- The application should be ready to start now
yarn start
# or
npm start
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 :)
Please do xo
Just make sure you run eslint before committing please!