Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pradumnasaraf/opensource-api
A free and public Open Source API.
https://github.com/pradumnasaraf/opensource-api
api chai docker express javascript mocha mongodb mongoose nodejs
Last synced: 2 months ago
JSON representation
A free and public Open Source API.
- Host: GitHub
- URL: https://github.com/pradumnasaraf/opensource-api
- Owner: Pradumnasaraf
- License: gpl-3.0
- Created: 2022-06-06T12:00:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-26T16:03:29.000Z (12 months ago)
- Last Synced: 2024-11-07T09:02:43.981Z (2 months ago)
- Topics: api, chai, docker, express, javascript, mocha, mongodb, mongoose, nodejs
- Language: JavaScript
- Homepage: https://opensourceapi.vercel.app
- Size: 320 KB
- Stars: 27
- Watchers: 2
- Forks: 17
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
![OpenSource API banner](https://user-images.githubusercontent.com/51878265/212617054-61bc38e5-ea65-4594-a23c-f46de14b7fec.png)
An Open Source, free, and public API.
[![Publish Docker Image to DockerHub](https://github.com/Pradumnasaraf/OpenSource-API/actions/workflows/publish-dockerhub.yml/badge.svg)](https://github.com/Pradumnasaraf/OpenSource-API/actions/workflows/publish-dockerhub.yml) [![Publish Image to GitHub Container Registry](https://github.com/Pradumnasaraf/OpenSource-API/actions/workflows/publish-ghcr.yml/badge.svg)](https://github.com/Pradumnasaraf/OpenSource-API/actions/workflows/publish-ghcr.yml) [![Unit Tests + Lint](https://github.com/Pradumnasaraf/OpenSource-API/actions/workflows/lint-testing.yml/badge.svg)](https://github.com/Pradumnasaraf/OpenSource-API/actions/workflows/lint-testing.yml) [![Format](https://github.com/Pradumnasaraf/OpenSource-API/actions/workflows/prettier.yml/badge.svg)](https://github.com/Pradumnasaraf/OpenSource-API/actions/workflows/prettier.yml)
## 🛠️ Technlogies used
| Server | Database | Testing | Deployment |
| :------------------------: | :------: | :---------: | :--------: |
| Node.js, Express, Mongoose | MongoDB | Mocha, Chai | Vercel |## 📌 Endpoints
| Endpoints | Description | Method |
| :---------------- | :-------------------------- | :----- |
| `/` | Home page. | GET |
| `/api/devtip` | Returns a list of dev tips. | GET |
| `/api/devtip/:id` | Returns a single dev tip. | GET |
| `/api/devtip` | Creates a new dev tip. | POST |
| `/api/devtip/:id` | Updates a dev tip. | PATCH |
| `/api/devtip/:id` | Deletes a dev tip. | DELETE |## 👨💻 Developing the API
This section includes how to test and develop API at your end. You can either run it in the cloud using **Gitpod** or run it inside a container using **docker** or choose to set up the complete environment locally.
**GitPod**
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/Pradumnasaraf/OpenSource-API)
**Docker Compose**
Prerequisites - Docker and Compose installed in your local system.
You can run below command and you can access the API at `localhost:9009`
```bash
docker compose up
```**Local setup**
Prerequisites- Node.js installed and a Mongo server on your localhost.
Make sure you have installed all the dependencies and you have a MongoDB server running on your local machine. Also, make sure are in the root directory of the project.
Step 1: Copy `.env.example` to `.env`.
```bash
npm run env
```Step 2: Run the app in development mode.
```bash
npm run dev
```## 🛡️ License
**OpenSource API** is licensed under the GPL-3.0 License - see the [LICENSE](/LICENSE) file for details.
## 🤝 Support
Don't forget to leave a star ⭐️.