This is the backend for Adela's portfolio website, built with Node.js, Express, and MongoDB.
- RESTful API for portfolio, blog, testimonials, and contact
- Admin dashboard endpoints
- Authentication and authorization
- File uploads (for images, etc.)
- Email integration for contact form
If you haven't already, clone this repository to your local machine:
git clone https://github.com/PHILIPADELA/portfolio-backend.git
cd portfolio-backendMake sure you have Node.js (v16 or higher) installed. You can check your version with:
node -vThen install the required packages:
npm installCreate a .env file in the root of portfolio-backend/ with the following:
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
EMAIL_USER=your_email@example.com
EMAIL_PASS=your_email_password
CLOUDINARY_URL=your_cloudinary_url
To run the server in production mode:
npm startTo run in development mode (with auto-reload using nodemon):
npm run devThe API will be available at http://localhost:5000 by default (check your config).
src/— Main source code (routes, controllers, models, etc.)uploads/— Uploaded files (images, etc.)README.md— Project documentation
- API Endpoints: Update or add endpoints in
src/routes/andsrc/controllers/. - Models: Edit or add Mongoose models in
src/models/. - Email/Cloudinary: Update integration in
src/utils/as needed. - Environment: Adjust variables in your
.envfile for your setup.
- If you see errors about missing packages, run
npm installagain. - Make sure MongoDB is running and your connection string is correct.
- For Windows users, use PowerShell or Command Prompt for commands.
- Use tools like Postman to test your API endpoints.
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
MIT