Skip to content

francislagares/mern-monorepo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image

MERN Monorepo Starter

This repository is built with pnpm workspaces and contains API Node.js Server and React Frontend UI .

  • Node.js: Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine. Node.js brings JavaScript to the server
  • MongoDB: A document-based open source database
  • Express: A Fast, unopinionated, minimalist web framework for Node.js
  • React: A JavaScript front-end library for building user interfaces

GitHub Workflow Status

Packages

  • Express.js 4.18.2
  • React 18.2.0
  • React-dom 18.2.0
  • React Router 6.6

Tooling

  • ES6
  • Eslint
  • Prettier
  • Precomit Lint
  • Versioning

Monorepo

  • Pnpm workspaces

Setup Instructions

1. Running Locally

To run the API locally:

  1. Clone the repository and install dependencies.
# clone repository
git clone git@github.com:francislagares/github-org-finder.git

# cd into
cd github-org-finder

# install required dependencies
pnpm install

Environment Variables

The API requires the following environment variables. Configure these in a .env or .env.development.local file in the api directory.

GITHUB_SECRET=your_github_secret
REDIS_HOST=localhost
DATABASE_URL=mongodb://localhost:27017/mern_db
CORS_ORIGIN=http://localhost:5173

Running with Docker

To run the API using Docker:

  1. Ensure Docker and Docker Compose are installed and running on your system.

  2. Create a .env or .env.development.local file in the api directory with the following Docker environment variables.

GITHUB_SECRET=your_github_secret
REDIS_HOST=redis
DATABASE_URL=mongodb://mongodb:27017/mern_db
CORS_ORIGIN=http://localhost:5173
  1. Build and start the Docker containers:
docker-compose up --build
  1. Verify the API is running by accessing http://localhost:4000/api/v1/health

Author

All contributions are welcome

Contributions are more than welcomed.

Feel free to open issues for asking questions, suggesting features or other things!