This github repository, and also the book that it is meant to accompany, have now been superceded by the second edition of the book and a corresponding new repository: pro-mern-stack-2. The repository is no longer being maintained, but remains in GitHub as an archive.
This is the complete source code compilation of all code listings in the book Pro MERN Stack by Vasan Subramanian, published by Apress. The book can be purchased at any of these websites:
Each section in the book ends with a working application, which corresponds to a branch in this repository. For each section, you can browse the complete source, or look at the differences from the previous section/step using the appropriate link against each section, in this page.
There is no online demo, so if you want to take a peek into how the app will look like once it's done till the end of the book, you will need to do the following:
- Install Node.js (with npm) and MongoDB
- Clone this repository
- Run
npm install
in the project directory - Run
npm run compile
, followed bynpm run compile-server
to generate the bundles - Run
npm start
to start the server on port 3000 - (Optionally) Run
mongo scripts/init.mongo.js
to seed the database with some initial data
The above requires that you know, or able to find out how to install Node.js and MongoDB.
There are no code listings in this chapter.
Errata / Issues relating to Chapter 2
- Server-less Hello World: Full source
- Express: Full source | Diffs from previous step
- Separate script file: Full source | Diffs from previous step
- Transform: Full source | Diffs from previous step
- Automate: Full source | Diffs from previous step
- ES2015: Full source | Diffs from previous step
Errata / Issues relating to Chapter 2
- React Classes: Full source | Diffs from previous step
- Composing Components: Full source | Diffs from previous step
- Passing Data - Using Properties: Full source | Diffs from previous step
- Passing Data - Using Children: Full source | Diffs from previous step
- Dynamic Composition: Full source | Diffs from previous step
Errata / Issues relating to Chapter 3
- Setting State: Full source | Diffs from previous step
- Async State Initialization: Full source | Diffs from previous step
- Event Handling: Full source | Diffs from previous step
- Communicate Child to Parent: Full source | Diffs from previous step
- Stateless Components: Full source | Diffs from previous step
Errata / Issues relating to Chapter 4
- List API: Full source | Diffs from previous step
- Create API: Full source | Diffs from previous step
- Using List API: Full source | Diffs from previous step
- Using Create API: Full source | Diffs from previous step
- Error Handling: Full source | Diffs from previous step
Errata / Issues relating to Chapter 5
- Schema Initialization: Full source | Diffs from previous step
- MongoDB Node.js Driver: Full source | Diffs from previous step
- Read From MongoDB: Full source | Diffs from previous step
- Write to MongoDB: Full source | Diffs from previous step
Errata / Issues relating to Chapter 6
- Server-Side Modules: Full source | Diffs from previous step
- Using Webpack Manually: Full source | Diffs from previous step
- Transform and Bundle: Full source | Diffs from previous step
- Libraries Bundle: Full source | Diffs from previous step
- Hot Module Replacement: Full source | Diffs from previous step
- HMR Using Middleware: Full source | Diffs from previous step
- Debugging: Full source | Diffs from previous step
- Server-Side ES2015: Full source | Diffs from previous step
- ESLint: Full source | Diffs from previous step
Errata / Issues relating to Chapter 7
- Simple Routing: Full source | Diffs from previous step
- Route Parameters: Full source | Diffs from previous step
- Route Query String: Full source | Diffs from previous step
- Programmatic Navigation: Full source | Diffs from previous step
- Nested Routes: Full source | Diffs from previous step
- Browser History: Full source | Diffs from previous step
Errata / Issues relating to Chapter 8
- More Filters in List API: Full source | Diffs from previous step
- Filter Form: Full source | Diffs from previous step
- Get API: Full source | Diffs from previous step
- Edit Page: Full source | Diffs from previous step
- UI Components - Number Input: Full source | Diffs from previous step
- UI Components - Date Input: Full source | Diffs from previous step
- Update API: Full source | Diffs from previous step
- Using Update API: Full source | Diffs from previous step
- Delete API: Full source | Diffs from previous step
- Using Delete API: Full source | Diffs from previous step
Errata / Issues relating to Chapter 9
- Bootstrap Installation: Full source | Diffs from previous step
- Navigation: Full source | Diffs from previous step
- Table and Panel: Full source | Diffs from previous step
- Forms - Grid Based Forms: Full source | Diffs from previous step
- Forms - Inline Forms: Full source | Diffs from previous step
- Forms - Horizontal Forms: Full source | Diffs from previous step
- Alerts - Validations: Full source | Diffs from previous step
- Alerts - Results: Full source | Diffs from previous step
- Modals: Full source | Diffs from previous step
Errata / Issues relating to Chapter 10
- Basic Server Rendering: Full source | Diffs from previous step
- Handling State: Full source | Diffs from previous step
- Initial State: Full source | Diffs from previous step
- Server Side Bundle: Full source | Diffs from previous step
- Backend HMR: Full source | Diffs from previous step
- Routed Server Rendering: Full source | Diffs from previous step
- Encapsulated Fetch: Full source | Diffs from previous step
Errata / Issues relating to Chapter 11
- MongoDB Aggregate: Full source | Diffs from previous step
- Pagination: Full source | Diffs from previous step
- Higher Order Components: Full source | Diffs from previous step
- Search Bar: Full source | Diffs from previous step
- Google Sign-In: Full source | Diffs from previous step
- Session Handling: Full source | Diffs from previous step
Errata / Issues relating to Chapter 12
There are no code listings in this chapter.