Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Redux

You're reading from   Learning Redux Write maintainable, consistent, and easy-to-test web applications

Arrow left icon
Product type Paperback
Published in Aug 2017
Publisher Packt
ISBN-13 9781786462398
Length 374 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Daniel Bugl Daniel Bugl
Author Profile Icon Daniel Bugl
Daniel Bugl
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Why Redux? 2. Implementing the Elements of Redux FREE CHAPTER 3. Combining Redux with React 4. Combining Redux with Angular 5. Debugging a Redux Application 6. Interfacing with APIs 7. User Authentication 8. Testing 9. Routing 10. Rendering on the Server 11. Solving Generic Problems with Higher-Order Functions 12. Extending the Redux Store via Middleware

Setting up the backend

The backend will serve as a database and API for our blog. It will store user information and blog posts, and serve them to our application via a REST API.

The backend server code is provided by the book. You can find the template code for this chapter in chapter6_1.zip (which contains the server and our React/Redux application from the previous chapters).

Unpack the zip, change into the directory, and run npm install to install the dependencies. The backend server will also serve the frontend now. This means that it replaces the serve tool we used earlier. You can now:

  • Use npm start to start the backend and frontend in production mode
  • Use npm run start:dev to start the backend and frontend in development mode

Run npm run start:dev and open http://localhost:8080/api/ in your browser to verify that the backend is available and working:

Accessing the backend...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime