Introduction
  • Introduction
  • Setting up your environment
  • Lecture 3: A few points on what to expect
  • Join the student group
REST, creating the model and registering the routes
  • Introduction to REST
  • Create the Book model and books slice
  • Install third party packages
  • Create the router and register api-endpoints and handler
Implementing CRUD apis with data in memory
  • Add static data and implement 'getBooks'
  • Implement 'getBook' handler to get a single book
  • Implement 'addBook' and use Postman for http requests
  • Implement 'updateBook'
  • Implement 'removeBook'
Persisting the data
  • Create a Postgres database-instance and table
  • Refactor code to include database interaction
  • Set and load environment variables
  • Connect to the database instance
  • Implement 'getBooks' to get all book records from the table
  • Implement 'getBook' to get a book record from the table by its id
  • Implement 'addBook' to add a book record to the table
  • Implement 'updateBook' to update a book record on the table
  • Implement 'removeBook' to remove a book record from the table by its id
Refactor
  • Go modules
  • Create book and error models
  • Refactor driver and book model
  • Create utils methods
  • Create Getbooks Controller method
  • Create GetBooks Repository method
  • Refactor the GetBook handler
  • Refactor addBook, updateBook and removeBook handlers
  • Add CORS config
Source Code
  • Source Code
Bonus: Frontend with react and redux
  • 1 - Create react app and install packages
  • 2 - Create folders data & books container
  • 3 - Create Book component
  • 4 - Implement Book component
  • 5 - Create routes
  • 6 Implement the Nav component
  • 7 Create types, actions & reducers
  • 8 Implement fetchAllBooks
  • 9 - Connect to server
  • 10 - Render data and show loading state
  • 11 - Render server error message
  • 12 Connect createBook to redux
  • 13 Implement createBook action creator
  • 14 - Move fetchBooks from index to book component
  • 15 - Implement createBookError
  • 16 - Implement cancel action
  • 17 Implement edit action
  • 18 Implement editBook reducer
  • 19 Implement delete action
  • Bonus: Build a React-Redux client for the CRUD APIs you have implemented above
Bonus
  • REST authentication course