Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ This can be used for serving a variety of different content, such as JSON data,

The project is built using MSW and can be run directly on a local machine or in Docker containers.

The framework is written in TypeScript and can :

- Serve data from static files (JSON or text)
- Serve media : Images and Videos
- Serve markdown files
- Be used to write and test AWS Lambda Functions
- Use custom middleware to transform input/output
- Serve random Database seed data
- Serve persisted mock data to the database
- Perform CRUD operations on the local database via a REST endpoint
- Mock API error codes/messages for testing frontend error handling logic

## Set-up

Clone the repo or use the template button directly in GitHub to set-up a new repo using this one as a template.
Expand Down Expand Up @@ -84,18 +96,6 @@ npm run dev

## Using the Mock API Framework

The framework is written in TypeScript and can :

- Serve data from static files (JSON or text)
- Serve media : Images and Videos
- Serve markdown files
- Be used to write and test AWS Lambda Functions
- Use custom middleware to transform input/output
- Serve random Database seed data
- Serve persisted mock data to the database
- Perform CRUD operations on the local database via a REST endpoint
- Mock API error codes/messages for testing frontend error handling logic

### Setting up a new API route

The system uses file-based routing (similar to NextJS) - simply create a folder in '/api' that is then mapped to an api route with the folder name.
Expand Down