Prepare the Redux Server for Deployment

Project Source Code

Get the project source code below, and follow along with the lesson material.

Download Project Source Code

To set up the project on your local machine, please follow the directions provided in the README.md file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.

This lesson preview is part of the Fullstack React with TypeScript Masterclass course and can be unlocked immediately with a single-time purchase. Already have access to this course? Log in here.

This video is available to students only
Unlock This Course

Get unlimited access to Fullstack React with TypeScript Masterclass with a single-time purchase.

Thumbnail for the \newline course Fullstack React with TypeScript Masterclass
  • [00:00 - 00:15] Prepare the server. Copy the code from the attached files from the code 04 Redux completed server to your application root folder. Each would end up in the root of your project and it will contain file index.ts .

    [00:16 - 00:31] You will need to install a bunch of dependencies for it to work. You will need to install concurrently to be able to launch the front and back and simultaneously. You will need course to process data from different domains and different port as in our case counts as a different domain.

    [00:32 - 00:49] You will need express as the backend framework, loadDB to use JSON as the database nano ID to generate IDs and TS node to run TypeScript on our backend. Install those dependencies. You will also have to install the types for some of them.

    [00:50 - 01:08] For example for course, express and loadDB. After this done, open package JSON and here you want to add a couple more scripts. You will want to add the script to run the server. It's going to launch TS node with common JS module resolution strategy and it should run server index.ts.

    [01:09 - 01:29] And then the dev command that will run server and client simultaneously. We run concurrently and PM run start server and and PM run start. Now you should be able to run yarn, dev to start your application. If everything is fine, you will see that your client and server are running and you should be able to launch your app in the browser.

    [01:30 - 01:33] Try to draw something and make sure that everything still works.