GithubHelp home page GithubHelp logo

kidesleo / mocked-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ageddesi/mocked-api

0.0 0.0 0.0 1.19 MB

An API library of useful mocked endpoints to help you get your designs feeling lifelike with real data.

License: MIT License

Shell 0.02% JavaScript 0.04% TypeScript 99.91% Dockerfile 0.03%

mocked-api's Introduction

All Contributors

Mocked-API

About

Welcome to Mocked-API, this is a live API that can be accessed by anyone who needs data to test out their website, app, components etc.

Hacktoberfest Contributors

If you would like to contribute during Hacktoberfest please following our contribution guidelines (Which we are still working on) but here is a quick summary of what we expect in the process of dev to raising your PR.

  1. Find a ticket and ask to be assigned, once assigned start work. :) This is so we don't get multiple PR's for the same issue.
  2. Please branch from our active next release dev
  3. Please make sure your new endpoints all have OpenAPI Comments as they will be used to generate our swagger documentation.
  4. Please make sure you have added unit tests for end points and util functions.
  5. MOST importantly, have fun.

If you need help, please leave a comment on the ticket you are assigned to our join our discord by clicking the link below.

Getting Started

First you should head over to https://api.mocked-api.dev and read our live api docs than start calling the api endpoints for the data you need.

Join our discord

Join Our Discord

How to run Mocked-API

Once you've cloned this repository, running Mocked-API is quite easy, there are just 2 steps you have to follow:

  1. Install the dependencies
npm install
  1. Configure the application An example configuration file .env.example is provided.
npm run config
  1. Serve the application
npm run serve

This will show you where the application is running

Mock API is running on port 3000.

Getting Started (Docker)

  1. Ensure you have Docker installed
  2. Open your terminal/command line tool
  3. Run docker-compose up
  4. Open your browser to http://localhost:3000/

Now you should be able to make any request to that port, and get a response back!

๐Ÿ’ก If you browse to that port, you'll see our swagger documentation.

Testing

How to write tests

For each module you create you will also need to create a tests folder, Inside this folder there should be a api and utils (if you create any utils) folder.

The utils tests are fairly simple jests tests, the api routes tests are slightly different where you will need to add

import request from 'supertest';
import app from 'path/to/app';

to your tests and make a request in your test instead of calling a normal function.

How to run tests

run npm test run npm run test:watch to run the tests in watch mode.

FAQ

Q: Are you planning to add more end points?
A: I plan to add as many as I can, if there is a specific endpoint of data you would like to see feel free to add a Issue Request.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

I encourage you to contribute to Mocked-API! Feel free to fork the codebase and make a pull request for your changes.

Our contributing guide is currently WIP and available here CONTRIBUTING GUIDE

We use semantic commit messages

  • feat: (new feature for the user, not a new feature for build script)
  • fix: (bug fix for the user, not a fix to a build script)
  • docs: (changes to the documentation)
  • style: (formatting, missing semi colons, etc; no production code change)
  • refactor: (refactoring production code, eg. renaming a variable)
  • test: (adding missing tests, refactoring tests; no production code change)
  • chore: (updating grunt tasks etc; no production code change)

Sponsor

Do you like this project? Support it by donating.

Buy Me A Coffee

Contributors โœจ

Thanks goes to these wonderful people (emoji key):

Ahmed Silat
Ahmed Silat

๐Ÿ’ป
Yasio
Yasio

๐Ÿ’ป
Alberto Herrera Vargas
Alberto Herrera Vargas

๐Ÿ“–
CoลŸkun Atak
CoลŸkun Atak

๐Ÿ’ป
Rizky ian indiarto
Rizky ian indiarto

๐Ÿ’ป
Evan
Evan

๐Ÿ’ป
Trigstur
Trigstur

๐Ÿ’ป
fadkeabhi
fadkeabhi

๐Ÿ’ป
Thomas Martin
Thomas Martin

๐Ÿ’ป โš ๏ธ
Vu
Vu

๐Ÿ’ป ๐Ÿ“–
Kalwabed Rizki
Kalwabed Rizki

โš ๏ธ
Talison Fabio
Talison Fabio

๐Ÿ’ป
Chris Jones
Chris Jones

๐Ÿ”ง
jkol7
jkol7

๐Ÿ’ป
Siddharth Pandey
Siddharth Pandey

๐Ÿ’ป
Alex Harrison
Alex Harrison

๐Ÿ’ป
Derzan Chiang
Derzan Chiang

๐Ÿ’ป
ATH
ATH

๐Ÿ“–
Suraj Bhandarkar S
Suraj Bhandarkar S

โš ๏ธ
Fernando Guerrero
Fernando Guerrero

๐Ÿ“– โš ๏ธ
Anish De
Anish De

๐Ÿ“–
Vaibhav Garje
Vaibhav Garje

๐Ÿ’ป โš ๏ธ
Mayank Singh
Mayank Singh

๐Ÿ“–
Mike Hingley
Mike Hingley

๐Ÿ’ป
krishna
krishna

๐Ÿ’ป
Vadym Yatsyuk
Vadym Yatsyuk

๐Ÿ“–
Nicholas Robert Beckham
Nicholas Robert Beckham

โš ๏ธ
Ayanwola Ayomide
Ayanwola Ayomide

๐Ÿ’ป โš ๏ธ ๐Ÿ“–
Zuhaib Shah
Zuhaib Shah

๐Ÿ’ป
Guilherme Fernandes
Guilherme Fernandes

๐Ÿ’ป
Ben Halverson
Ben Halverson

๐Ÿ’ป โš ๏ธ
Ayush Chauhan
Ayush Chauhan

โš ๏ธ ๐Ÿ’ป
Edwards Moses
Edwards Moses

๐Ÿ“– โš ๏ธ
Rajitha Gunathilake
Rajitha Gunathilake

๐Ÿ’ป
Bram Musuko Panjaitan
Bram Musuko Panjaitan

โš ๏ธ
filip
filip

๐Ÿ’ป
Farhaan
Farhaan

๐Ÿ’ป

This project follows the all-contributors specification. Contributions of any kind welcome!

mocked-api's People

Contributors

ageddesi avatar alberturria avatar alexjharrison avatar allcontributors[bot] avatar anishde12020 avatar benhalverson avatar computamike avatar coskntkk avatar devrrior avatar devvspaces avatar eroxl avatar fadkeabhi avatar guilhermefernandes01 avatar headstylecolorred avatar kalwabed avatar kk5190 avatar lauk20 avatar mdmuaj13 avatar mito0o avatar nibih avatar renovate[bot] avatar rizkyrajitha avatar sherlyfebrianti96 avatar siddharth1729 avatar talis-fb avatar thom-asm avatar timothee-durand avatar vtv6 avatar yasionfire avatar zaibugemi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.