res-task
Solution to Fullstack Developer Application
Prerequisites
-
Node.js installed on your development machine. Get Node.js here.
-
Either a personal Microsoft account with a mailbox on Outlook.com, or a Microsoft work or school account. Sign up here
-
MongoDB Atlas account. Log In or Sign Up here
Register a web application with the Azure Active Directory admin center
Open a browser and navigate to the Azure Active Directory admin center. Login using a personal account (aka: Microsoft Account) or Work or School Account. Read about Registering an Application with AAD admin center
Generate MongoDB URI String
Configure the app
- Navigate to a directory of your choice using a CLI and run the following command:
git clone https://github.com/chidieberejoel/res-task.git
cd res-task
cd server
- Rename the
env.localhost.template
file to.env
- Edit the
.env
file and make the following changes.- Replace
CLIENT_ID_HERE
with the Application Id you got from the App Registration Portal. - Replace
SECRET_ID_HERE
with the Client Secret value you got from the App Registration Portal.
- Replace
- Replace the "DB_URL" variable with your Mongodb URI string.
- Import open_hours.csv into your Database to a schema titled restaurants
- In the CLI run the following command:
cd ..
cd client
Rename the env.localhost.template
file to .env
Run the application
In your CLI, run the following commands in the order:
- Front-end
cd client
npm install
npm start
- Server
cd server
npm install
npm start
Open a browser and browse to `http://localhost:3000