create-api
This is a lightweight boilerplate for creating APIs. It does not require any npm libraries except for the in-built Node modules, so it usually requires some handiwork and a trial-and-error process, but this compensates for its speed and minimalism.
Setup
-
npm i create-node-api-generator
Features
- JSON output
- Custom Headers that removed some possibly vulnerable headers
- Separate reusable models that handle messaging and defaulting data
- Custom Route Handler.
- Custom Test Package.
- Method, Route and Entry Tokens that allow or deny access to data.
To-Do list
- Header Options
- Route Handlers: Permitted, Not Found
- Method Handlers
- Customizable Default Response Files
- All types of Requests Working
- Ready for 1st publish
- Getting data to JSON files
- Suggestions for Routes
- Fix formatter sending undefined info
- Fix bodyResponse sending undefined info
- ESLint use
- Change output based on query through REST API pattern:
- Order
- Create
- Read
- Update
- Delete
- Body of Request is being shown
- Body of Response is sent
- Setup routes that can be accessed in /
- Class Route
- Install Docker
- Configure pg database
- Option for JSON or XML
- Use Sequelize to connect to a database
- Plain Text Option in Configs
- Custom CORS settings
- Setup connection to front-end
- API Key Authenticator
- Limit query per hour and per user
- Connection Timeout after 15s
- Maintain session state if API key
- Pages for Request
- Documentation
Documentation
- A description of the API
- NPM dependencies created for the project
- How to set up the project as a developer
- Testing
- Deployment
- Dependency management
- Contribution guide
- Code of conduct
- License
- Acknowledgements
c987e7dfad8e422497fc42cea23bcf7ec5ac4a3b