This is a simple notes application built using Node.js, Express, MongoDB, and Google OAuth for authentication. Users can sign in with their Google account, add, update, and delete their notes.
- Google OAuth authentication.
- Create, update, and delete notes.
- Store notes in MongoDB.
- RESTful API for managing notes.
-
Clone the repository:
git clone https://github.com/Namit200323/notesApp.git
-
Navigate into the project directory:
cd notes
-
Install dependencies:
npm install
-
Set up Google OAuth credentials:
- Visit the Google Cloud Console.
- Create a new project.
- Enable the Google OAuth API.
- Create OAuth credentials (OAuth 2.0 Client IDs).
- Add authorized redirect URIs for your app (e.g., http://localhost:3000/auth/google/callback).
- Copy the Client ID and Client Secret.
- Create a
.env
file in the project root and add the following:GOOGLE_CLIENT_ID=your-client-id GOOGLE_CLIENT_SECRET=your-client-secret
-
Start the server:
npm start
-
Access the application at
http://localhost:PORT
.
GET /notes
: Get all notes.POST /notes
: Create a new note.GET /notes/:id
: Get a single note by ID.PUT /notes/:id
: Update a note by ID.DELETE /notes/:id
: Delete a note by ID.
- Home Page
- User's Notes
- Update Note
- Delete Note
- express
- mongoose
- passport
- passport-google-oauth20
- dotenv
Contributions are welcome! Feel free to submit pull requests.
This project is licensed under the MIT License.