Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Technologies Used
- Node.js
- Express.js - Fast, unopinionated, minimalist web framework for Node.js
- MongoDB with Mongoose - Elegant MongoDB object modeling for Node.js
- EJS - Embedded JavaScript templating
- bcryptjs - Password hashing
- dotenv - Load environment variables from .env file
- nodemon - Automatically restart the application when file changes are detected (dev dependency)

## Installation

1. Clone the repository
```bash
git clone https://github.com/RAKESH-PATEL57/project-name.git
cd project-name
```

2. Install dependencies
```bash
npm install express mongoose bcryptjs ejs dotenv
npm install nodemon --save-dev
```

Or simply:
```bash
npm install
```

3. Set up your environment variables in a `.env` file
```
PORT=3000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
```
9 changes: 4 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ app.use(cors());
const bcrypt = require("bcryptjs");
app.set("view engine", "ejs");
app.use(express.urlencoded({ extended: false }));
const dotenv = require("dotenv");
dotenv.config();

const jwt = require("jsonwebtoken");
var nodemailer = require("nodemailer");

const JWT_SECRET =
"hvdvay6ert72839289()aiyg8t87qt72393293883uhefiuh78ttq3ifi78272jbkj?[]]pou89ywe";

const mongoUrl =
"mongodb+srv://adarsh:adarsh@cluster0.zllye.mongodb.net/?retryWrites=true&w=majority";
const JWT_SECRET = process.env.JWT_SECRET;

const mongoUrl = process.env.MONGO_URI;
mongoose
.connect(mongoUrl, {
useNewUrlParser: true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"main": "index.js",
"scripts": {
"start": "node app.js"
"start": "nodemon index.js"
},
"author": "adarsh",
"license": "ISC",
Expand Down