GithubHelp home page GithubHelp logo

tif-api's Introduction

TIF Attendance Tracker API

This project is dependant on nodejs, npm and postgreSQL. Please install them before using this API.

Project Setup

  1. Download or clone the project.
  2. Now go to projects root folder, i.e.
    cd ~/tif-api
  3. Run the command below to setup environment and install project dependenies.
    npm install
  4. Add your postgres local password to the client object in connection.js. We use all the other localhost defaults.

Run the Server

  • Run below command to start the server
    npx nodemon app.js

Usage Instructions

  1. To setup a sample database, run the init.sql file in your local postgres shell with \i path_to_init.sql
  2. Get all employees by making a GET request to /employee.
  3. Get an employee by id making a GET request to /employee/:id.
  4. Add a new employee by making a POST request to /employee/:id with the following json format in the body.
    {
    "first_name": "emp3fname",
    "last_name": "emp3lname",
    "mobile_no": "1234567890",
    "email_id": "[email protected]"
    }
    
  5. Get attendance of all employees by making a GET request to /attendance.
  6. Get attendance of an employee by id by making a GET request to /attendance/:id.
  7. Add a new checkin entry for an employee by making a POST request to /attendance/:id.
  8. Add a new checkout entry of an employee by making a PATCH request to /attendance/:id.
  9. Delete an employee with id by making a DELETE request to /employee/:id.

tif-api's People

Contributors

h0mtanks avatar

Watchers

 avatar

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.