FeedHenry MBaaS Management Service
JavaScript HTML Other
Switch branches/tags
rh-release-99.99.0-rc1 release-9.18.0-rc1 release-4.6.5-rc4 release-4.6.5-rc3 release-4.6.5-rc2 release-4.6.5-rc1 release-4.6.2 release-4.6.2-rc1 release-4.6.0 release-4.6.0-rc5 release-4.6.0-rc4 release-4.6.0-rc3 release-4.6.0-rc2 release-4.6.0-rc1 release-4.6.0-er1 release-4.5.1 release-4.5.1-rc2 release-4.5.1-rc1 release-4.5.0 release-4.5.0-rc7 release-4.5.0-rc6 release-4.5.0-rc5 release-4.5.0-rc4 release-4.5.0-rc3 release-4.5.0-rc2 release-4.5.0-rc1 release-4.3.0-rc1 release-3.20.4 release-3.20.4-rc1 release-3.20.3 release-3.20.3-rc3 release-3.20.3-rc2 release-3.20.3-rc1 release-3.20.2 release-3.20.2-rc2 release-3.20.2-rc1 release-3.20.1 release-3.20.1-rc1 release-3.20.0 release-3.20.0-rc3 release-3.20.0-rc2 release-3.20.0-rc1 release-3.19.2 release-3.19.2-rc1 release-3.19.1 release-3.19.1-rc2 release-3.19.1-rc1 release-3.19.0 release-3.19.0-rc5 release-3.19.0-rc4 release-3.19.0-rc3 release-3.19.0-rc2 release-3.19.0-rc1 release-3.18.3 release-3.18.2 release-3.18.2-rc1 release-3.18.1 release-3.18.1-rc1 release-3.18.0 release-3.18.0-rc5 release-3.18.0-rc4 release-3.18.0-rc3 release-3.18.0-rc2 release-3.18.0-rc1 release-3.17.3 release-3.17.3-rc1 release-3.17.2 release-3.17.2-rc2 release-3.17.2-rc1 release-3.17.1 release-3.17.1-rc1 release-3.17.0 release-3.17.0-rc6 release-3.17.0-rc5 release-3.17.0-rc4 release-3.17.0-rc3 release-3.17.0-rc2 release-3.17.0-rc1 release-3.16.5-rc1 release-3.16.4 release-3.16.4-rc1 release-3.16.3 release-3.16.3-rc1 release-3.16.2 release-3.16.2-rc1 release-3.16.1-rc1 release-3.16.0 release-3.16.0-rc7 release-3.16.0-rc6 release-3.16.0-rc5 release-3.16.0-rc4 release-3.16.0-rc3 release-3.16.0-rc2 release-3.16.0-rc1 release-3.15.2 release-3.15.2-rc1 release-3.15.1 release-3.15.1-rc1 release-3.15.0 release-3.15.0-rc1
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github
config
docker
docs
lib
licenses
scripts
test
.dockerignore
.gitignore
CONTRIBUTING.md
Dockerfile.dev
Gruntfile.js
Jenkinsfile
LICENSE
README.md
fh-mbaas.js
fh-mbaas.yml
npm-shrinkwrap.json
package.json

README.md

fh-mbaas - FeedHenry MBaaS Management Service

Email Configuration

To configure email sending from fh-mbaas, the email.transport configuration property must be set to:

  • "" to use the default transport (sendmail).
  • "sendgrid" - to use sendgrid. The following config must also be set on the email.sendgrid object:
  "auth": {
      "api_user": "SENDGRID_USER",
      "api_key": "SENDGRID_PASSWORD"
    }
  • "smtp" - to use SMTP. An SMTP connection URL must also be set on the email.smtp string:

"smtps://user:password@smtp.example.com"

OSE3

For OSE3 images, fh-mbaas will use smtp by default. An administrator must add an Environment variable to configure fh-mbaas to use a local SMTP relay/server - the name of this environment variable is FH_EMAIL_SMTP and it should be set to an SMTP URL:

e.g.

smtps://user:password@smtp.example.com

Testing (grunt fh:test)

  • Modules published to npm.skunkhenry.com.

    • The module turbo-test-runner has been updated (heapdump and memwatch needed upgrading), due to permissions on npmjs this has been published to npm.skunkhenry.com.

Developing on OpenShift

For development purposes, we can build a CentOS based Docker image and watch for changes in the local filesystem which would be reflected in the running image.

Build the development image

  1. Generate the config file: grunt fh-generate-dockerised-config
  2. docker build -t docker.io/my-Username/fh-mbaas:dev -f Dockerfile.dev .
  3. docker push docker.io/my-Username/fh-mbaas:dev
  4. oc edit dc fh-mbaas
  5. Replace the image with the tagged version above.

Hot Deployment

The development image will allow you to sync local code changes to the running container without the need for rebuilding or redeploying the image.

From the root of the `fh-mbaas directory, run the following:

oc rsync --no-perms=true --watch ./lib $(oc get po | grep fh-mbaas | grep Running | awk '{print $1}'):/opt/app-root/src

Debugging with VS Code

  1. Open Visual Studio Code
  2. oc set probe dc fh-mbaas --liveness --readiness --remove=true
  3. oc port-forward $(oc get po | grep fh-mbaas | grep Running | awk '{print $1}') :5858. - This will forward port 5858 from the running Pod to a local port. Note the port.
  4. Select the debug option and choose Node.js as the runtime.
  5. Set the launch.json file similar to the following, using the port obtained above via the port forward command:
{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "attach",
      "name": "Attach to Remote",
      "address": "localhost",
      "port": 59180,
      "localRoot": "${workspaceRoot}",
      "remoteRoot": "/opt/app-root/src/"
    },
    {
      "type": "node",
      "request": "launch",
      "name": "Launch Program",
      "program": "${workspaceRoot}/fh-mbaas.js"
    }
  ]
}
  1. Click Attach to Remote.

License

fh-mbaas is licensed under the Apache License, Version 2.0.