GithubHelp home page GithubHelp logo

damiancipolat / true-north-challenge Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 296 KB

True North - Node.JS code challenge

JavaScript 100.00%
nodejs javascript microservices codechallenge rabbitmq

true-north-challenge's Introduction

True-North-Challenge

My solution for the True North Node.js Sr - Challenge

Install:

Install dependences, node modules:

$ npm install

Configuration:

Go to the file /config/config.json, NOTE: for this example I provide a running environment, using Postgresql DB as service "elephantsql.com" and Rabbitmq as service "cloudamqp.com" for the email service I user Gmail with a real but test account.

{
	"debug"   : true,
	"database":{
		"user"  : "snigmgei",
		"db"    : "snigmgei",
		"pwd"   : "BpbVMSMR4JlTQ-fGjBjhpiVxOlKanmHr",
		"host"  : "baasu.db.elephantsql.com",
		"type"  : "postgres"
	},
	"rabbitmq":{
		"url" : "amqp://kewhjifg:[email protected]/kewhjifg"
	},
	"mailer":{
		"user": "[email protected]",
		"pwd" : "kikijs2018ABC",
		"type": "gmail"
	},
	"services":{
		"api":{
			"ip"      : "127.0.0.1",
			"port" 	  : 8080,
			"mapsKey" : "AIzaSyAVqBwjx92F0bRh8f9c9tY8XBnxyJTihYg"
		},
		"notifications":{
			"logFile" : "./services/notifications/log.txt"
		}
	}
}

Schema:

To create all the tables that user the api service, you must run this command.

#To create schema.
$ npm run create-schema

Run:

To start the two services "Restaurant Api-rest" and "Order messaggin":

#To run Api rest service.
$ npm run api

#To run Order messaging sevice.
$ npm run notif

Test:

To run the test:

$ npm run test

To test the api endpoints, check first that the server is runnig by default the url is 'http://127.0.0.1:8080'.

$ npm run test-api

true-north-challenge's People

Contributors

damiancipolat avatar

Watchers

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