https://github.com/overloadedsam/dev-arena
Web app for developers where they can showcase their skills. Developers can interact with other developers on the platform by posting questions, solutions and Up or Down voting the post.
https://github.com/overloadedsam/dev-arena
bootstrap express javascript mongodb node react redux redux-thunk
Last synced: 3 months ago
JSON representation
Web app for developers where they can showcase their skills. Developers can interact with other developers on the platform by posting questions, solutions and Up or Down voting the post.
- Host: GitHub
- URL: https://github.com/overloadedsam/dev-arena
- Owner: OverloadedSam
- Created: 2021-06-30T17:04:19.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-11-18T14:41:40.000Z (over 3 years ago)
- Last Synced: 2025-03-02T10:42:15.526Z (over 1 year ago)
- Topics: bootstrap, express, javascript, mongodb, node, react, redux, redux-thunk
- Language: JavaScript
- Homepage: https://devarena.onrender.com
- Size: 2.21 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dev-Arena
This project is a Web app for developers where they can showcase their skills. Developers can interact with other developers on the platform by posting questions, solutions and Up or Down voting the post.
## Requirements
- `node >= 14.0.0`
- `npm >= 6.14.8`
## Usage
$ git clone https://github.com/OverloadedSam/Dev-Arena.git
2. Move to the below locations and run `npm install` from there
$ cd Dev-Arena/
$ cd Dev-Arena/frontend/
$ cd Dev-Arena/backend/
3. Install project dependencies (For both frontend and backend).
$ npm install
## Configure App
You have to set the environment variables of your configuration before starting the server.
### 1. Config directory for root
Make a `/config` directory and inside this directory make config files for different environments e.g. `development.json`.
NOTE: This step is important for running scripts from the root of the project and set below properties in `development.json` or `default.json` file.
### 2. Config for backend API
Place a `config` i.e `development.json` or `default.json` file at `Dev-Arena/backend/` location and set following environment variables in the `json` file.
{
"mongoURI": (your_mongo_db_connection_string),
"apiUrl": "/api",
"salt": "10",
"secret": (secret_for_json_web_token)
}
### 3. Environment variables for frontend
Place a `.env` file at `Dev-Arena/frontend/` location and set following environment variables.
REACT_APP_API_URL={backend_api_url} // e.g. http://localhost:8000/api/v1
## Running The Project
### Run backend (Node API)
$ cd backend/ // got to backend directory
$ npm start // run backend with hot reloading.
// or you can run the backend with standard node command
$ node server.js
### Run frontend (React app)
$ cd frontend/ // got to frontend directory
$ npm start
### Run frontend and backend from root folder
There are some scripts to run the project
$ npm run server // simply run server without watching files.
$ npm run backend // run server with watching file changes.
$ npm run client // run react development server
$ npm run dev // run both backend server and frontend at the same time.
NOTE: `/config` directory must be present at the root of the project with appropriate `config files`while running scripts like `npm run dev` from the `root` of the project.