Oanete (Pronounced: Oh neat!) is an Express Node TypeScript project that uses an Open API file to describe the API, and to help ensure the implementation matches that description.
To avoid having more operations defined in implementation over what is defined in the Open API file, see Oanete-C: https://github.com/NguyenAndrew/Oanete-C
Useful to watch the following video, to understand the benefits of structuring a project in this format: https://www.youtube.com/watch?v=nfkppuQ-Eg0 - "Phil Sturgeon presents Design First APIs using Stoplight Studio @ PHP South Wales"
- Download Stoplight Studio (Note: Either Mac, Windows, or Linux depending on your desktop)
- Using Stoplight Studio, select "Open Existing Folder", and open up this project's api_documentation folder
- Edit the API the way you want it to be!
- Update implementation code to match API (More instructions on running code below)
- Navigate to the run_locally directory
- Open terminal of choice in the run_locally directory
- Install your dependencies with
npm install
- Run your application with
npm run start
(Note:start:windows
,start:linux
, andstart:mac
are also available) - Ready to Code!
- Download Postman App
- Open Postman and go to File->Import->File, upload the api file located within this project's ./api_documentation/reference/api.yaml
- Click import
- Start calling the API!
- Make sure you are on the root directory
- Build the docker image:
docker build -t my-penjar-app-image .
- Run the image as a docker container:
docker run -p 8080:8080 -it --rm --name my-running-penjar-app-container my-penjar-app-image
- Download Draw.io Desktop Edition
- In diagrams folder, open architecture.drawio.png in Draw.io Desktop Edition
- Make changes
- Click save button!
- Note: This command will update dependencies in the following folders: run_locally, back_end, and front_end
- Navigate to the run_locally directory
- Open terminal of choice in the run_locally directory
- Check which dependencies need to be upgraded with
npm run dependup:check
- Upgrade all dependencies with
npm run dependup
- Upgrade dependencies in your package-lock.json with
npm install
- Optional: Check to see which dependencies were not updated (due to failing tests) with
npm run dependup:check