Code Monkey home page Code Monkey logo

microservice-employees-odoo's Introduction

Microservice Employees Odoo

A simple microservice for getting information about employees from the ERP odoo.

Table of contents

List of endpoints

The current available endpoint for the api are the next one:

Employees

/employees : GET

# Request params
id - numeric (optional)
name - string (optional)
email - string (optional)
company - string (optional)

JSON Response

{
  "status": 200,
  "msg": "success",
  "data": [
    {
      "id": 1,
      "name": "Administrator",
      "job_id": null,
      "job_title": null,
      "department_id": 1,
      "department": "Administration",
      "parent_id": null,
      "parent_name": null,
      "coach_id": null,
      "company_id": 1,
      "company": "Caresle Company",
      "work_email": "[email protected]",
      "work_phone": null,
      "mobile_phone": null,
      "pin": null
    }
  ]
}

Deploy

Requirements

You need to have a odoo database for the project to work, also see Docker if you want to deploy the project using docker.

Steps to install the project

  1. Clone the repository
  2. Install the dependencies with:
npm i
  1. Copy .env.example and rename for .env
  2. Set up the .env variables
  3. Build the project with:
npm run build
  1. Start the project with:
npm run start

Docker

If you want to use docker follow the previous step, just run these additional commands.

  1. For building the docker image
docker build -t odoo_microservice ./
  1. For start the container (remember that the odoo db need to be running)
docker run --name employees_microservice -p 3005:3005 -d odoo_microservice

Replace the -p with <PORT_HOST>:<PORT_IN_THE_ENV_FILE> for the app to run

microservice-employees-odoo's People

Contributors

caresle avatar

Stargazers

Roy Cohen 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.