Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A very simple microservice example with NodeJS, Python and Docker

License

NotificationsYou must be signed in to change notification settings

kasvith/simple-microservice-example

Repository files navigation

A very simple microservice example with NodeJS, Python and Docker

Run the API gateway

  • Installdocker anddocker-compose according to your operating system

  • Clone the repository and navigate to it

  • Rundocker-compose up to start the services

  • TryGET http://YOUR_HOST:3000/api/status to check whether application is running

Build the frontend

The application uses a frontend written with plain html with jQuery and to style with Bulma.This is built with webpack. This default application is built assuming you are using thelocalhost.

To build this to fit your ownIP Address please follow the steps before you running thedocker-compose up

  • Install NodeJs on your system

  • Go to FrontendApplication directory

  • Runnpm install or if you have yarnyarn to install packages

  • Now you need to set the API Gateway for this frontend application. It can be any host you have.

    • Let's say you are hosting this application onhttp://example.com then yourAPI_GATEWAY would be this one.
    • If you are hosting in some machine with IP123.324.345.1 then yourAPI_GATEWAY would be your IP.
  • To pass this setting to webpack build you need to set an Environment Variable

    • Windows :set API_GATEWAY=http://YOUR_HOST
    • Linux/Max :API_GATEWAY=http://YOUR_HOST
    • Remember no / at the end of the URL to get your web app work
  • Now you can donpm run build oryarn build

  • Checkdist/ folder for newly created index.html and the main.js

  • Now run thedocker-compose up on the root folder of project and checkhttp://YOUR_HOST:8080 to see web app

image

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp