Skip to content

slidewiki/search-service

Repository files navigation

Search Microservice

Build Status License Language Framework Webserver Coverage Status

This microservice fetches search results from solr.

Where to start developing?


Have a look at the file application/server.js, that is the main routine of this service. Follow the require(...) statements to get trough the entire code in the right order.

When you want to have a look at tests, head over to the folder application/tests/. We're using Mocha and Chai for our purposes.

Since we're developing our application with NodeJS, we're using npm as a task runner. Have a look at the /application/package.json script section to obtain an overview of available commands. Some are:

# Run syntax check and lint your code
npm run lint

# Run unit tests
npm run unit:test

# Start the application
npm start
...

You want to checkout this cool service? Simply start the service and head over to: http://localhost:3000/documentation. We're using swagger to have this super cool API discrovery/documentation tool. BTW.: Did you already discoverd the super easy swagger integration inside /application/routes.js? Tags 'api' and 'description' were everything we needed to add.

What's about Continuous Integration/Delivery?


Continuous Integration (and in the future Continuous Delivery) is currently setup by using the (for OSS projects) free to use web application Snap-CI. By clicking on the first badge (see at the top), you will be redirected to Snap-CI. There you can have a look at all the different build stages.

We've also setup Code Coverage reports. This is done by Coveralls. Just click on the coverage badge and you'll be redirected to our corresponding Coveralls project.

In the future, we will exchange Snap-CI with our local instance of Bamboo at the Fraunhofer institute. There will be no changes for you, except that the UI looks a little different.

Use Docker to run/test your application


You can use Docker to build, test and run your application locally. Simply edit the Dockerfile and run:

docker build -t MY_IMAGE_TAG ./
docker run -it --rm -p 8880:3000 MY_IMAGE_TAG

Alternatively you can use docker-compose to run your application in conjunction with a (local) mongodb instance. Simply execute:

docker-compose up -d

About

Microservice that fetches search results from solr.

Resources

License

Stars

Watchers

Forks

Packages

No packages published