Welcome to the ENcycloPYdia (ENPY) API!
To get a copy of this project up and running on your local machine, follow these steps:
Before you begin, make sure you have the following installed on your machine:
-
Clone the Repository
git clone https://github.com/fiattarone/enpyapi.git cd enpyapi
-
Install Dependencies
yarn install
-
Start the API
yarn start
This should solely be used for my project RabbitHole, but be my guest as it's public.
This endpoint allows you to query for a word by its value.
- URL:
/word/:word
- HTTP Method: GET
This endpoint allows you to generate a random 32 char ApiKey.
- URL:
/api/
- HTTP Method: GET
This example demonstrates how to query a word using the API:
Request:
GET /word/apple
This example demonstrates how to generate an API key using the API:
Request:
POST /api/
Content-Type: application/json
Request Body
{
"institutionName": "University of Fiattarone",
"contactEmail": "Fiattarone@me.com",
"issuedBy": "The Man Himself -- DTF"
}
- Should probably rate limit the apikey endpoint, and make this rate limit probably 10 guesses/day
- Rotate apikeys annually
- Using ufw to manage ports:
- -3000: Testing
- -22: SSH
- Commands:
sudo ufw allow XXXX/tcp
Enables port XXXX
sudo ufw enable && sudo ufw status
Enables ufw & shows open ports
- Using pm2 to run enpyapi in background:
- Commands:
pm2 start ~/enpyapi/src/index.js && pm2 monit
- For files not included in the git clone:
scp /path/to/local/file username@remote_host:/path/to/destination
Moves files from local machine to remote server
- Reach out to me to get your OpenVPN client configuration. Quite simple. I'll email it over or something. Or maybe I'm a paranoid superstitious nerd that needs you to go to a specific location, then ask you to check under a rock for a USB that will self-detonate after one use. That being said, never contact me on a Friday the 13th. Or even a 13th. Don't even mention mirrors. Apple nerds, you see that shiny apple on the lid of your macbook? Better not have a scratch on it--that counts as a broken mirror. Unless you own a black cat. You see, if you own a black cat, two negatives = positive. Anybody who doesn't know their math obviously isn't quality enough to work on this project. So know your math.
- mongoose
- mongodb
- node
- express
- express-validator
- yarn
- dotenv
- cross-env
- express-rate-limit
- crypto
- axios
- stripe
--TBD, but just go ahead and submit a PR if that's your thing.
This project is licensed under the [MIT License] - see the LICENSE.md file for details.