dd9e1f70e6
This pr is auto merged as it contains a mandatory file and is opened for more than 10 days. |
||
---|---|---|
client | ||
docs | ||
server | ||
.gitignore | ||
LICENSE.txt | ||
README.md | ||
SECURITY.md |
README.md
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Project Setup
To set up and run the application, please follow the procedures outlined in the following subsections:
Setting up the local project
-
Clone the repository to your local machine:
git clone https://github.com/Microsoft/MentalHealthPlatform.git
-
Download and install Node.js onto your development machine from https://nodejs.org/.
-
Check whether the installation of Node was successful by running the following command; a version number should be printed:
node -v
-
Download and install Yarn on your development machine from https://yarnpkg.com/lang/en/docs/install/.
-
Similar to that of the installation of Node.js, check whether the installation of Yarn was successful by running the following command; a version number should be printed:
yarn -v
Setting up the database
-
Download and install MongoDB from the MongoDB website:
-
If using a Windows machine, one may need to add mongo to the environment variables. The instructions regarding the addition of environment variables can be found in the Microsoft Docs article for installing and configuring MongoDB:
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/install-mongodb
-
Create a directory to store the data.
mkdir <path>
-
Set the path for storing the data:
mongod --dbpath /data/<path>
-
Run the service using the following command:
brew services start mongodb-community@4.2
-
After installing MongoDB, launch the MongoDB terminal by using the following command:
mongo
-
To add sample data, enter the commands listed in the "docs/database_ commands.txt" file of this repository
Setting up the server
-
In the cloned project, navigate to the server directory:
cd server
-
Install the dependencies:
yarn
-
Run the server:
yarn start
The console should then print a statement about the server running on a certain port:
Server is running on Port 3000...
Setting up the client
-
In the cloned project, navigate to the client directory:
cd client
-
Install all dependencies:
yarn
Running the project
-
Run the client:
yarn start
The console should then print a statement with a URL in which the application is running.
For example:
Project is running at http://localhost:8080/
-
Launch the application in a web browser by navigating to the URL printed by the console