Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
change .js to .ts
  • Loading branch information
alanb-sony authored Oct 15, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent b05d935 commit 746b89b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -261,13 +261,13 @@ paths:
**Q**: How do I modify the example API and make it my own?
**A**: There are two key files that enable you to customize and describe your API:
1. `server/routes.js` - This references the implementation of all of your routes. Add as many routes as you like and point each route your express handler functions.
1. `server/routes.ts` - This references the implementation of all of your routes. Add as many routes as you like and point each route your express handler functions.
2. `server/common/api.yaml` - This file contains your [OpenAPI spec](https://swagger.io/specification/). Describe your API here. It's recommended that you to declare any and all validation logic in this YAML. `express-no-stress-typescript` uses [express-openapi-validator](https://github.com/cdimascio/express-openapi-validator) to automatically handle all API validation based on what you've defined in the spec.

**Q**: I previously generated an app, but I want to change the API root. How do I do this?

**A**: You need to make to small changes
1. Modify `server/routes.js`
1. Modify `server/routes.ts`
```javascript
// Change your original path e.g. /api/v1/examples, to:
app.use('/api/v2/examples', examplesRouter);

0 comments on commit 746b89b

Please sign in to comment.