Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fc5570/api-template
An API Template which shows how an API works, uses express.
https://github.com/fc5570/api-template
api bots discord javascript js
Last synced: about 2 months ago
JSON representation
An API Template which shows how an API works, uses express.
- Host: GitHub
- URL: https://github.com/fc5570/api-template
- Owner: FC5570
- License: mit
- Created: 2021-03-03T10:07:15.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-14T01:34:28.000Z (about 2 years ago)
- Last Synced: 2024-05-01T19:24:49.808Z (8 months ago)
- Topics: api, bots, discord, javascript, js
- Language: JavaScript
- Homepage:
- Size: 50.8 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# API Template
An api template showing how an API works. Uses express.
Please look below for the steps to set this up.### Config
1. Go to config.js
2. Edit the `port` with the port you want to run the API on.### Starting the API
1. After you're done with editing the config, save the file and run `npm i` in your terminal.
2. This'll install all the packages the API uses.
3. Start the API with `node server.js`. If you're locally hosting the API, go to `localhost:your_port_here` on your browser to access it.### List of endpoints:
| Type of Request | Endpoints | Required Paramters | Description |
| --------------- | --------- | ------------------ | ---------------------------------------------- |
| GET | `/quote` | none | Displays a random quote along with its author. |
| GET | `/joke` | none | Displays a random joke. |
| GET | `/base64` | type, text | Encodes and decodes text to and from base64. |### If you need any help, you can DM me on Discord (FC#5104) for help.