A C&I Studios cloud storage solution build with MongoDB, ExpresJS, ReactJS, and NodeJS (MERN).
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
If you already have node installed on your machine but not currently on v12.4.0, you may encounter errors when running the app in your terminal. Use the node version manager (NVM) to install and switch to node v12.4.0.
MonogoDB is our databse of choice. Make sure to download the latest version of MongoDB Server and Compass and installed on your machine.
Run this command in your terminal to install and switch to node v12.4.0:
nvm install 12.4.0
If you already have that version installed, then just switch to it by running this command:
nvm use 12.4.0
Then check the version to make sure your machine is using the correct node:
$ node -v
v12.4.0
To get started, use the node package manager (NPM) to install all the packages from the directory where you cloned the qubee project, and on the banckend directory wihin the qubee directory.
Run this command in your qubee (root) directory:
npm install
Browse to the backend directory and run the command again:
cd backend
npm install
When all the packages are installed, browse back to the root directory run this commeand:
cd ..
echo "REACT_APP_API_URL=http://localhost:5000/api" > .env
This will create a .env file with REACT_APP_API_URL environment variable. This API URL is used to interact with the nodejs backend.
Finally make sure you have MongoDB server and compass installed/setup and is running on the default local URL: mongodb://localhost:27017
To start using the app:
npm run dev
This command will concurrently run react-scripts start
for the frontend of our app and nodemon server.js
for the backend of our app.
We also have a debugger npm package in our app that we use to replace console.log()
in the backend. To start the app with the debugger enabled:
Mac OS / Git Bash:
DEBUG=app:* npm run dev
Windows CMD:
set DEBUG=app:* & npm run dev
PowerShell:
$env:DEBUG='app:*';npm run dev
The app will automatically create two directories in the qubee (root) public directory:
- shared
- uploads
Then it'll create the qubee database in MongoDB with two collections and five documents to get things ready:
- folders
- all
- shared
- documents
- pictures
- videos
- settings
Those documents are virutal folders for the app to keep the files organized. However, all files uploaded will be added to the uploads directory.
- MongoDB - The database we use
- Express JS - A node js framework
- React JS - The JavaScript library we use to build the user interface
- Node JS - Used to build the app backend
TBD
This project is licensed by C&I Studios, Inc. and can only be used by C&I Studios, Inc.