/res-task

A Task to show open restaurants at the current time, with Microsoft login and sessions.

Primary LanguageJavaScriptMIT LicenseMIT

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

Read Here

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
  1. Rename the env.localhost.template file to .env
  2. Edit the .env file and make the following changes.
    1. Replace CLIENT_ID_HERE with the Application Id you got from the App Registration Portal.
    2. Replace SECRET_ID_HERE with the Client Secret value you got from the App Registration Portal.
  3. Replace the "DB_URL" variable with your Mongodb URI string.
  4. 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