The Star Wars API
- About
- Required Features
- Pivotal Tracker
- Heroku Deployment
- Swagger Documentation
- Technologies Used
- Acknowledgements
- Author
- Listing the names of Star Wars movies along with their opening crawls and comment counts.
- Getting the character list for a movie.
- Adding anonymous comments for a movie.
- Listing anonymous comments for a movie.
Pivotal Tracker Stories can found here Pivotal Tracker
Application was deployed to Heroku. Use public URL https://swapi-allebd.herokuapp.com with API endpoints.
API Documentation was generated with Swagger.
- Node-js Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world.
- PostgreSQL used for setting up relational database
- Sequelize a Node.js ORM for Postgres
- Babel used for transpiling codes from ES6 to ES5
- Mocha used for setting up tests
- Chai an assertion library for node and the browser that can be delightfully paired with any javascript testing framework.
- Docker helps securely build, share and run modern applications anywhere
- Redis helps to cache data for a faster response rate
- You need to have Git, Node, NPM and Docker installed on your computer.
- Installing Node automatically comes with npm.
- Clone this project to your local machine
https://github.com/allebd/swapi.git
Run the command below
git clone https://github.com/allebd/swapi.git
- Installing the project dependencies
Run the command below
npm install
-
Create a .env file similar to the .env.sample file
-
Create your database
Run the command below
npx sequelize db:create
- Add tables to database
Run the command below
npm run db:ready
- Start your node server
Run the command below
npm start
- Use
http://localhost:3000
as base url for endpoints
METHOD | DESCRIPTION | ENDPOINTS |
---|---|---|
GET | Listing the names of Star Wars movies | /api/v1/movies |
GET | Getting the character list for a movie | /api/v1/movie/:episodeId/characters |
POST | Adding anonymous comments for a movie | /api/v1/movie/:episodeId/comments |
GET | Listing anonymous comments for a movie | /api/v1/movie/:episodeId/comments |
GET | Get API Documentation | /docs |
- Run test for all endpoints
run the command below
npm test