Star Wars API is organised around REST, designed and develop with ExpressJS & Node
- Its reetrieve a random character from a given category in the JSON file.
- Its retrieve a list of available categories in the JSON file
- It does a free text search.
- Download and install node on your PC/Laptop
- clone the repo
- cd in star-wars-sever
- npm install express --save
- npm install ejs --save
- node i nodemon --save
- npm install express body-parser --save
- npm install supertest mocha --save-dev Start the server
- npm start Test Endponts
- npm test
-
Go to brower and enter any endpoints and press enter key button
-
http://localhost:3000 -home
-
http://localhost:3000/characters -character endpoint
-
http://localhost:3000/categories -categories endpoint
-
http://localhost:3000/search?keyword=LukeSkywalker -search endpoint
Note: search?keyword=name will display result of search in the command line terminal.
- Go to postman official website and download app
- Postman chrome extension is available on chrome web store
- Go to google and do a search Add postman chrome extension
- Open postman
- Copy and paste endpoint
- Change request to GET
- Query params Key = Keyword Value = same as name enter in keyword search
Star-wars-server | Public | Routes-index.js | Views-Categories.ejs-Characters.ejs-Home.ejs-Search.ejs | Test | Character.json | Index.js(Main) | Package.json | Package-lock.json | README.md