Overview
NodeAPI is a REST API server implementation built on Node.js and Express.js with Mongoose.js for MongoDB integration. It follows the OAuth 2.0 spec for access control using OAuth2orize and Passport.js. The updated code adheres to the RESTful API With Node.js + MongoDB article.
Features
- Node.js and Express.js: Built on top of Node.js and Express.js.
- Mongoose.js Integration: Includes integration with Mongoose.js for MongoDB.
- OAuth 2.0 Access Control: Follows OAuth 2.0 spec for access control.
- RESTful API: Implemented based on the RESTful API With Node.js + MongoDB practices.
- Docker Support: Can be run using Docker for easier deployment.
- Testing Modules: Utilizes modules like tape and superagent for testing.
- Tools: Includes tools like JSHint for code quality and httpie for command-line HTTP requests.
Manual Installation
- Ensure Node.js and MongoDB are installed on your macOS.
- Set up Node.js on macOS.
- Set up MongoDB on macOS.
- Run the server.
- Create demo data.
Docker Installation
- Ensure Docker is installed on your system.
- Run the server using Docker.
- Create demo data.
Making Requests
- To create and refresh access tokens, follow the specified procedure.
- Create article data using the provided guidelines.
- Update existing article data as needed.
- Retrieve the required data.
Tests
- Testing modules used include tape, superagent, and others.
Summary
NodeAPI is a comprehensive REST API server solution that leverages Node.js, Express.js, and Mongoose.js for MongoDB integration. It maintains access control following the OAuth 2.0 spec and adheres to RESTful API principles. The inclusion of Docker support and various testing modules enhances the development experience. With clear installation instructions and usage guidelines, NodeAPI offers a robust framework for building RESTful APIs.