Giter Site home page Giter Site logo

archimydes_node_app's Introduction

Archimydes Node App

Technology used

  • Node
  • Express
  • Postgres
  • JWT
  • Typescript
  • TypeORM

Asumptions

  • I assumed that the user will specify the acount type when creating a new user

Endpoint

  • POST http://localhost:3001/api/auth/register to register an account
  {
	"firstName": "Kingsley",
	"lastName": "Obot",
	"email": "[email protected]",
	"password": "secret",
        "role": "Admin" // Optional, default is user
}

  • POST http://localhost:3001/api/auth/login to login
{
	"email": "[email protected]",
	"password": "secret"
}

  • POST http://localhost:3001/api/tickets to create a ticket. Add token x-access-token in the header
{
    "summary": "Setup Heroku",
    "description": "Set up heroku server on the project",
    "type": "BugFix",
    "complexity": "Low",
    "completionTime": 2,
    "cost": 2000,
    "status": "New"
}

  • GET http://localhost:3001/api/tickets to get all tickets (Admin role). Add token x-access-token in the header

  • GET http://localhost:3001/api/tickets/{id} to get a single ticket. You can only get a ticket you created. Add token x-access-token in the header

  • PUT http://localhost:3001/api/tickets/{id} to make changes to a ticket (Admin role). Add token x-access-token in the header
{
    "type": "Enhancement",
    "status": "Accepted" // Note: You can change other fields also.
}

Improvements

  • Unfortunately, due to time constraints, I couldn't refactor the controller to make use of a Service.

archimydes_node_app's People

Contributors

kingsman20 avatar

Watchers

James Cloos avatar  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.