NODE.JS and TYPESCRIPT ROLE BASED USER MODEL AND ROUTES.

Job ID: 33161248

Budget: $30 – $250 CAD

THIS MUST BE DONE IN TYPESCRIPT

BACKEND CODE ONLY! No frontend UI

ROLE BASED USER MODEL AND ROUTES

The admin has to be able to create user profiles these users must be able to be classified as different users for example: a manager and a regular employee, the users must be created with username as email, users homes address and Latitude and Longitude. Please make sure you use node backend with a MongoDb database.

THIS MUST BE DONE IN TYPESCRIPT

ALL I NEED IS THE USER MODEL AND THE CURRENT-USER route with the different roles assigned for example:

import express from 'express';
import { currentUser } from '@impauth/common';

const router = express.Router();

router.get('/api/users/currentuser', currentUser, (req, res) => {
res.send({ currentUser: req.currentUser || null });
});

But for all the user roles.
Related categories: Node.js Express JS Typescript