Skip to content

natisaver/LeaveTrackerAzureSQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SQL Azure Leave Tracker

Explanation of Files

Tech Stack:

  • Client Side - ReactJS
  • Server Side - NodeJS, Express

Features:

  • GET, POST from Database
  • Overall List of Leaves
  • Individual Leave History

Structure

  1. Config.js
    • Contains all the env variables required
  2. dboperations.js
    • Contains all queries
    • Connects to SQL Server
  3. server.js
  • Express Server
  • Contains all routes

Backend (root folder, not /backend)

NPM Installs and scripts

//for the entry point put to server.js instead of index.js

npm init
npm i -D nodemon concurrently
npm i mssql dotenv express body-parser cors 
npm install http-errors --save

To add into package.json "scripts" (Root) NOT BACKEND FOLDER

    "type": "module"

    "start": "node backend/server",
    "server": "nodemon backend/server",
    "client": "npm start --prefix frontend",
    "dev": "concurrently \"npm run server\" \"npm run client\""
    "data:import": "node backend/seeder -d",
    "data:export": "node backend/seeder",

Root to also include .env (Root)

PORT = ... 3002 etc.
SERVER = ...
USER = ...
PASSWORD = ...
DB = ...

Frontend

NPM Installs and scripts

//for the entry point put to server.js instead of index.js

npm i react-bootstrap axios react-router-dom react-bootstrap-table-next react-dates moment

To add into package.json "scripts" (Frontend)

frontend localhost:3000 & backend on port 3002, need to proxy
"proxy": "http://127.0.0.1:3002",

About

Azure SQL Express Leave Tracking React App & API ✈️

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published