Skip to content

AnhtuanUit/node-farm

Repository files navigation

Node-Farm: Learning Node.js

Welcome to Node-Farm, a simple Node.js project designed for learning and practicing core concepts. This project provides hands-on experience with essential Node.js skills, drawing inspiration from the "Node.js, Express, MongoDB & More: The Complete Bootcamp 2024" Udemy course.

Video Demo and Live Application

Watch the Demo Video

Click on the image above or use this link to watch the demo video.

Explore the live demo of the Natours web application: Node Farm Demo

Note: The live demo is hosted on a free hosting service, and it may take about 1 or 2 minutes for the server to wake up if it's in a sleeping state.

Getting Started

  1. Clone the repository:

    git clone https://github.com/AnhtuanUit/node-farm.git
  2. Install dependencies:

    npm install
  3. Ensure nodemon is installed globally (if not already):

    npm install -g nodemon
  4. Run the server:

    npm start

Key Features and Concepts Covered

  1. File System Operations:

    • Demonstrates file read and write operations in Node.js.
    • Highlights the difference between blocking and non-blocking I/O.
  2. HTML Templating:

    • Builds and fills HTML templates with data using manual parsing techniques.
  3. Core Module Usage:

    • Creates routes using core modules in Node.js without relying on external frameworks like Express.
  4. URL Parsing:

    • Manually parses URLs from the browser to understand the underlying mechanisms.
  5. Module Creation:

    • Develops custom Node.js modules to encapsulate functionality and enhance code modularity.
  6. npm Module Management:

    • Introduces npm, including installing external packages, specifying package versions, and updating packages.

npm Packages Used

  • eslint, eslint-config-airbnb, eslint-config-prettier, eslint-plugin-import, eslint-plugin-jsx-a11y, eslint-plugin-node, eslint-plugin-prettier, eslint-plugin-react: For linting and maintaining code quality.
  • prettier: Code formatter for consistent code styling.
  • nodemon: Monitors changes in files and automatically restarts the server during development.

Course Inspiration

Author

  • Tuan Do

Feel free to explore the code, experiment with different concepts, and enhance your understanding of Node.js fundamentals. This project intentionally avoids using popular frameworks like Express to provide a deeper understanding of core Node.js concepts. Happy coding!