https://github.com/raviyatechnical/learn-nodejs
Learning Node JS
https://github.com/raviyatechnical/learn-nodejs
boilerplate expressjs javascript learning-no mongodb mongoose mvc nodejs rest-api
Last synced: 3 months ago
JSON representation
Learning Node JS
- Host: GitHub
- URL: https://github.com/raviyatechnical/learn-nodejs
- Owner: raviyatechnical
- Created: 2024-01-07T04:04:07.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-21T07:42:42.000Z (over 1 year ago)
- Last Synced: 2025-10-22T06:59:57.523Z (8 months ago)
- Topics: boilerplate, expressjs, javascript, learning-no, mongodb, mongoose, mvc, nodejs, rest-api
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README

# Learning Node.js
This project creates a learning of Node.js frontend and backend.
mongodb and chat system using socket
### 💰 Support by donating or sponsoring us.,
[](https://github.com/sponsors/bhargavraviya) [](https://www.patreon.com/raviyatechnical/membership) [](https://www.buymeacoffee.com/raviyatechnical) [](https://ko-fi.com/raviyatechnical)
-----
## Features
- REST API using MySQL (Sequelize)
- REST API with Caching using node-cache
## Run Locally
```
/project-root
│── /src
│ ├── /config
│ │ ├── database.js # Sequelize MySQL Connection
│ │ ├── mongoose.js # MongoDB Mongoose Connection
│ ├── /models
│ │ ├── /sequelize # Sequelize Models (MySQL)
│ │ │ ├── index.js # Sequelize ORM Setup
│ │ │ ├── user.model.js # Example Sequelize Model
│ │ │ ├── order.model.js # Example Sequelize Model
│ │ ├── /mongoose # Mongoose Models (MongoDB)
│ │ │ ├── index.js # Mongoose Models Import
│ │ │ ├── category.model.js # Example Mongoose Model
│ │ │ ├── product.model.js # Example Mongoose Model
│ ├── /enums
│ │ ├── Status.js # Common Status Enum
│ │ ├── UserRole.js # Common User Role Enum
│ ├── /migrations # Sequelize Migrations
│ ├── /seeders # Sequelize Seed Data
│ ├── /repositories # Data Access Layer (For Clean Code)
│ │ ├── user.repository.js # Repository for Sequelize (MySQL)
│ │ ├── category.repository.js # Repository for Mongoose (MongoDB)
│ ├── /services # Business Logic Layer
│ │ ├── user.service.js # User Service (MySQL)
│ │ ├── category.service.js # Category Service (MongoDB)
│ ├── /controllers # Controllers (Express.js Routes)
│ │ ├── user.controller.js # Handles Sequelize Models
│ │ ├── category.controller.js # Handles Mongoose Models
│ ├── /routes
│ │ ├── user.routes.js # Routes for MySQL (Sequelize)
│ │ ├── category.routes.js # Routes for MongoDB (Mongoose)
│ ├── /middlewares # Express.js Middlewares
│ ├── /utils # Helper Functions
│ ├── app.js # Main Express App
│ ├── server.js # Start Server
│── /tests # Unit & Integration Tests
│── .env # Environment Variables
│── package.json # Dependencies
│── README.md # Project Documentation
```
## Run Locally
Clone the project
```bash
git clone https://github.com/raviyatechnical/learn-nodejs
```
Go to the project directory
```bash
cd learn-nodejs
```
Copy .env.example to .env
```bash
cp .env.example .env
```
Install dependencies
```bash
npm install
```
Start the server for development
```bash
npm run dev
```
## Run Server
Start the server
```bash
npm run start
```
## JWT Token
```bash
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
```
## Tech Stack
**Client:** Coming Soon
**Server:** Node, Express
**Database:** MongoDB, MySQL (Sequelize)
## Authors
- [@bhargavraviya](https://www.github.com/bhargavraviya)
## Lessons Learned
What did you learn while building this project? What challenges did you face and how did you overcome them?
[LEARN.md](LEARN.md)
## License
[MIT](https://choosealicense.com/licenses/mit/)