No description
  • TypeScript 100%
Find a file
2023-09-07 13:32:42 +01:00
config add env var functions. 2023-09-05 12:56:52 +01:00
server Process middleware first before parsing request body. Add description to route handler. 2023-09-07 13:31:54 +01:00
src Add description to sample project. 2023-09-07 13:32:42 +01:00
.eslintignore Init commit. 2023-09-05 11:58:49 +01:00
.eslintrc Init commit. 2023-09-05 11:58:49 +01:00
.gitignore Init commit. 2023-09-05 11:58:49 +01:00
LICENSE.md Init commit. 2023-09-05 11:58:49 +01:00
package-lock.json add dotenv to load env file. 2023-09-06 21:12:50 +01:00
package.json add dotenv to load env file. 2023-09-06 21:12:50 +01:00
README.md update readme. 2023-09-06 21:12:29 +01:00
tsconfig.json add env var functions. 2023-09-05 12:56:52 +01:00

Declarative JSON API Server Framework

The objective of ParkourJSON is to provide a concise, typed, non-verbose, and declarative way of implementing a JSON API server without the need for code generation (an unnecessary and annoying step).

A 'JSON API' in this sense is an API that:

  • Only responds to JSON-formatted requests.
  • Only responds with JSON-formatted responses.

Getting Started

Simply clone or fork this project.

Forking is recommended to allow for downstream merging of future improvements.

After cloning or forking, see the sample API implementation in the src directory.

How to Fork

To create a new project based on this framework, do not use the 'fork' feature of GitHub. Instead, follow these steps:

  1. On GitHub, create a new empty repository (let's call this the project repo).

  2. git clone the project repo locally and cd into it.

  3. Add this repository as an upstream remote to the local project repo clone, we will name the remote framework.:

    
      git remote add framework https://github.com/ParkourOps/parkour-json
    
    
  4. Create a local branch on the project repo clone called framework which will reflect the main branch of this repository.

    
      git fetch framework main
    
      git checkout -b framework --track framework/main
    
    
  5. Create the main branch on the project repo.

    
      git checkout -b main
    
      git push -u origin main
    
    
  6. Install the Node dependencies and get developing!

    
      npm install
    
    

Work to Do

In order of precedent:

  • Implement global middleware.

  • Implement an OPTIONS handler on all possible routes which should respond with concise representation of the API good enough to be used as user documentation.

  • Implement unit tests.

  • Implement functional tests.

  • Documentation!

  • Improve typing to further improve development experience.