additional intro of mp3
play

Additional Intro of MP3 Jinda Han April 1, 2020 Getting Started - PowerPoint PPT Presentation

CS 498RK SPRING 2020 Additional Intro of MP3 Jinda Han April 1, 2020 Getting Started Clone and initial the MP3 git alone https://gitlab.com/uiuc-web-programming/mp3.git mp3 cd mp3 npm install Run MP3 npm start http://localhost:4000/api/


  1. CS 498RK SPRING 2020 Additional Intro of MP3 Jinda Han April 1, 2020

  2. Getting Started

  3. Clone and initial the MP3 git alone https://gitlab.com/uiuc-web-programming/mp3.git mp3 cd mp3 npm install

  4. Run MP3 npm start http://localhost:4000/api/ Environment good 👎

  5. Postman A useful Dev tool: “The Collaboration Platform for API Development”

  6. Download Postman • https:/ /www.postman.com/

  7. Run Postman Check API : localhost:4000/api/ Return like this (nothing) because you haven’t implemented your mp!

  8. mongoDB Atlas

  9. Register • https:/ /www.mongodb.com/cloud/atlas

  10. Build a New Cluster

  11. Wait for a while!

  12. Connect

  13. Username Password mongodb+srv:// test_d4 :< password >@cs498rkmp3-jxf1h.mongodb.net/test?retryWrites=true&w=majority What is the password?

  14. User and Password mongodb+srv:// test_d4 :< password >@cs498rkmp3-jxf1h.mongodb.net/test?retryWrites=true&w=majority

  15. Connect the Project mongodb+srv:// test_d4 :< password >@cs498rkmp3-jxf1h.mongodb.net/test?retryWrites=true&w=majority Type your Username , Password , and URL , not mine.

  16. Before Running anything…

  17. Task Implement an API with the following required endpoints (they would be preceded by something like http:/ /localhost:4000/api/*). Your implementation should use Node, Express and Mongoose.

  18. Create the endpoints Simple Example, not full code You need to implement POST/ GET/PUT/DELETE This is an example, implementation may vary

  19. Complete Mongoose Schema Complete the Schema for User and Task This is an example, implementation may vary

  20. After you finish

  21. Fill Database: dbFill.py cd mp3/database_scripts/ python3 dbFill.py -u "localhost" -p 4000 -n 20 -t 100

  22. Clean the Database cd mp3/database_scripts/ python3 dbClean.py -u "localhost" -p 4000

  23. Testing MP3

  24. Query Example

  25. Example Returns full list of tasks localhost:4000/api/tasks

  26. Return a list of completed Tasks http://localhost:4000/api/tasks?where={"completed": true}

  27. Returns tasks number from 61 to 80 http://localhost:4000/api/tasks?skip=60&limit=20

  28. Tips

  29. Basic Test Cases (70% total grade) • Retrieve the list of users • Insert a new user • Retrieve a valid user • Update a valid user • Retrieve a valid user with parameters • Retrieve user count • Delete a valid user • Retrieve an invalid user • Delete an invalid user • Retrieve the list of tasks • Insert a new task • Retrieve a valid task • Update a valid task • Retrieve a valid task with parameters • Retrieve task count • Delete a valid task • Retrieve an invalid task • Delete an invalid task (Invalid user = nonexistent user) Extra test corner cases worth 30% points, will not release

  30. Additional Resources • Express Tutorial Using Database with Mongoose • https:/ /developer.mozilla.org/en-US/docs/Learn/Server-side/ Express_Nodejs/mongoose • Express Basic Routing • https:/ /expressjs.com/en/starter/basic-routing.html • Mongoose API Docs • https:/ /mongoosejs.com/docs/api • MongoDB Docs • https:/ /docs.mongodb.com/manual/tutorial/query-documents/ • https:/ /docs.mongodb.com/manual/reference/database- references/ • HTTP Status Code • https:/ /www.restapitutorial.com/httpstatuscodes.html

  31. Thanks!

  32. Reference • Images: https://images.google.com/ • Questions Insight: https://piazza.com/ CS498rk SP19 and SP20

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend