Code Monkey home page Code Monkey logo

food-service's Introduction

REPOSITORY-SERVICE

The service-oriented architecture repository is part of an arrangement to store critical information about the service-oriented architecture as a whole

Pre requisites

 Node => 16.x
 Docker => v20.10
docker-compose => v1.29

Installation

cd food-service
$ docker-compose build --no-cache
$ docker-compose up --force-recreate

Then, you will need to create a .env file in the root of the project

PROJECT_NAME=base-app
PROJECT_MODE=development
SERVER_HOSTNAME="http://localhost"
SERVER_PORT=3000

MONGODB_HOSTNAME=127.0.0.1 ## to build the container you should use "mongo" insted of 127...
MONGODB_PORT=27018
MONGODB_USERNAME=root
MONGODB_PASSWORD=newPassword
MONGODB_DATABASE=service_repository_dev

JWT_SECRET_KEY=shhhh

SECRET_SALT=shhhh

Troubleshooting

Find the container IP:

docker container inspect <CONTAINER ID>

and look for the IPAddress inside of Network field.

If you have any problem with the container follow this steps:

  • Run mongo
docker-compose up mongo 
  • Set the env variables
MONGODB_HOSTNAME=127.0.0.1 
  • Run the project
yarn start

Scripts

start

yarn start

test

Run the unit tests

yarn test

Run the integration tests

yarn test:integration

build

Compile the project

yarn build

build and run

Compile the project and run it

yarn serve

Documentation

Production

Docker configuration

docker network create intranet

sh deploy.sh

Manual Testing Steps

  • Please Run the application with this command: docker-compose -f "docker-compose.yml" up -d --build
  • Go to http://localhost:4000/v1/api/user
  • for a dev enviroment create a file (".env") and add the following variables:
PROJECT_MODE=development
SERVER_HOSTNAME="http://localhost"
SERVER_PORT=3000

MONGODB_HOSTNAME=127.0.0.1 ## to build the container you should use "mongo" insted of 127...
MONGODB_PORT=27018
MONGODB_USERNAME=root
MONGODB_PASSWORD=newPassword
MONGODB_DATABASE=service_repository_dev

JWT_SECRET_KEY=shhhh

SECRET_SALT=shhhh
  • Also you can enter to the coinainer log and check the log

food-service's People

Contributors

weylermaldonado 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.