Giter VIP home page Giter VIP logo

backend's Introduction

NPHC Software Engineer (Frontend) Assignment

Employee salary management webapp

Authors

Tech Stack

Client: React, TypeScript

Server: Node, Express

Database: MySQL

Frontend

Frontend Github Repo

Backend

Backend Github Repo

Installation

Database Configurations

  • Create a new MySQL database called backend
backend
  • Inside the backend folder change the config/db.js for database configurarions
module.exports = {
    HOST: 'localhost',
    USER: 'root',
    PASSWORD: '',
    DB: 'backend',
    dialect: 'mysql',
    pool: {
        max: 5,
        min: 0,
        acquire: 30000,
        idle: 10000
    }
}

Backend Configurations

  • Do you want to change backend port, change the index.js PORT variable
const PORT = 8081;
  • Do you want to change frontend cross URL, change the index.js coreOptions variable
let coreOptions = {
  origin: "http://localhost:3000",
};

Frontend Configurations

  • Do you want to change backend cross URL, change the .env file REACT_APP_API_URL
REACT_APP_API_URL=http://localhost:8081

Running

To run backend, run the following command

  cd backend
  npm install
  npm start

To run frontend, run the following command

  cd frontend
  npm install
  npm start

API Reference

Get all employees

  GET /api/employees

Upload Employees

  POST /api/employees/upload

Update Employee

  PUT /api/employees/${id}
Parameter Type Description
id string Required. Id of item to fetch

Delete Employee

  DELETE /api/employees/${id}
Parameter Type Description
id string Required. Id of item to fetch

backend's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.