
Develop a backend service in Node.js using Express and test driven development. Implement validation, internationalization, caching, and database migrations via Sequelize, deploying to Heroku and Google Cloud via GitHub actions.
Install Node.js and npm, use Postman for testing, configure sqlite and postgres with db browser and pgadmin; develop in vscode with eslint and prettier, deploy to heroku using git.
Master test driven development by writing tests before implementing requirements, cycling through red, green, and refactor phases to run tests, validate behavior, and keep existing functionality clean and reusable.
Create a node project with npm init, set up package.json and app.js, install express for an app on port 3000, then configure npm scripts, jest, and git for testing.
Establish eslint and prettier for consistent code in Node.js, configure ecma version 6 and node environment, integrate prettier with eslint, add lint script, and enable nodemon for auto restarts.
a practical web client helps visualize user flows for a node js backend, showing http-server setup, port forwarding to the express backend, and basic login and signup.
Adopt test driven development to implement sign up by creating __tests__ modules, posting to api one zero users with supertest, and asserting 200 responses and user created.
Learn to save a user to a SQLite database using Sequelize, modeling a user with username, email, and password, and validate with test-driven development using beforeAll and beforeEach.
Learn to hash passwords in a Node.js app using bcrypt, replacing plain text storage in sqlite, and ensure tests verify the hashed password using async hashing and salt rounds.
Refactor the app after tests in tdd by moving user operations to a dedicated router, introducing a user service, and adopting async/await for clearer, reusable code.
Configure Node.js apps with environment-based databases by integrating config and cross-env, create development and test json files, and update scripts to switch between sqlite databases for testing.
Create and test reusable express middleware for username and email validation with next in the chain; accumulate errors in the request and return a consolidated 400 response from route handler.
Learn to validate username, email, and password using dynamic tests in Node.js with test driven development. Replace boilerplate with test.each and backtick table data, asserting field-specific validation errors.
Enforce username min four and max 32 with not empty checks and bail, validate password min six with pattern checks, and ensure email validation uses is email in table-driven tests.
Implement custom email validation in Node.js with Express Validator, ensuring unique emails via database constraint, tests, and error handling with clear validation messages.
Add internationalization to the Node.js app by extracting messages into variables and translating them with i18next. Use the accept-language header to run tests and return English and Turkish translations.
Explains activating a user account by sending a real email with a unique activation link, and introduces an inactive flag and activation token in the user model with token generation.
Drive test driven development to implement activation emails with node mailer, mock external services using node mailer stub, and verify recipient and activation token in tests.
Mock email service in node tests to simulate 502 mail failures, handle errors with try/catch, and prevent user persistence using transactions; implement a custom email exception and translations.
Refactor tests for node js with test driven development by replacing email mocks with a real smtp server, streamlining end-to-end mail testing and test filtering.
Explore a test-driven approach to activating a user account in Node.js via a token-based API, updating activation status, and multilingual success and error messages.
Learn to test account activation in a Node.js app by simulating email delivery with Ethereal, configuring test and development mailers, and validating token-based activation on the web client.
centralize error response generation with common fields such as path, timestamp, and message, add validation failure handling and translations, and implement a standard error model for consistent client responses.
After signup, implement login and authentication use cases and add a user listing on the home page with paginated results via a user service.
Compute total pages by counting active users and applying ten users per page, producing two pages while excluding inactive users.
Implement robust pagination in a Node.js REST API with test driven development by handling page queries and page size, computing offsets, validating inputs, and enabling next-page indicators for users.
Implement a page size parameter for the get users endpoint, parse size as a number, default to ten, and cap at ten. Apply test-driven development to verify behavior, cover non-numeric inputs and bounds, and refactor pagination into a reusable middleware.
Shows how to fetch a single user by id in a node express app with test-driven development, including 404 handling, translation-aware messages, and restricted response fields.
Implement authentication to validate user credentials such as email and password, return 200 on success, and use base64 credentials in the authorization header for future requests with bcrypt hashing.
Implement authentication failure handling with 401 and 403 responses through test-driven development. Use bcrypt to compare passwords, employ express-validator for input validation, and deliver internationalized error messages via translation keys.
Refactor tests to remove app dependencies and enforce async/await in node test-driven development. Align translation keys across authentication, registration, and listing to ensure robust, integration-tested flows.
Implement update user functionality with authentication checks in node.js, including bcrypt password hashing and test-driven development. Validate unauthorized and forbidden responses through focused tests.
Implement a basic authentication middleware to validate credentials, authorize user updates by ID, and apply username changes with a 200 response in a Node.js test-driven workflow.
Exclude the logged-in user from the authorization aware user list by updating the get users function to filter by not the authenticated id, with basic auth and bcrypt, adjusting pagination.
In this course we will be building a fully functional backend service with express of node js. we will call our application as hoaxify.
while building this application, we will learn
how we can build a restful web service with express js, with all necessary functionalities like validation, internationalization, static resource serving, caching, json manipulation, interacting with external services
how we can handle database operations with orm package, sequelize.
how we can manage database version history and migrations
and we will see
how test driven development works.
how it's affecting our code quality, reusability
how it's giving us the confidence about refactoring our implementation
how we can deploy the application to heroku
how we can create an instance in google cloud and deploy our application to it
and how we can automate the deployment with github actions.
This course is purely built on practice. Each code piece we write, will be for our actual application implementation.
In each section we will gradually build our application. We will not jump ahead and add functionality not needed for that moment. We will implement one requirement at a time. Each implementation will bring the next requirement to us.
And following this practice, will help you to get a solid foundation about overall rest web services requirements and how to implement one of them with node js by following test driven development methodology.