Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content
  • Advanced Node.js TIBCO Cloud? Integration topics

    Deepesh Tiwari

    Node.js on TIBCO Cloud? Integration

    1. Getting started
    2. Prerequisites
    3. My first Node.js app
    4. Deploy your first Node.js app
    5. Test your Node.js app
    6. Manage your Node.js apps
    7. Adding dependencies to your app
    8. Run your app locally
    9. Understanding the generated code
    10. Advanced topics
    11. Best practices
    12. Resources

    Now that we?ve covered the basics, let?s look at a few more advanced topics.

    Bottom-up generation

    The first part of the tutorial started with the API first, and code second. While this is generally a very useful principle when it comes to building APIs, you can use Node.js for so many other projects as well. To make that a little easier we?ve built an extension for Microsoft Visual Studio Code that helps you with that. You can download the extension from our GitHub page. After you?ve installed it, you now have a command called TCI: Create a new Node.js app which gives you the minimum boilerplate code you need to get started:

     ????<folder> ?   |???manifest.json ?   ????myApp |       |???.env |       |???package.json |       |???server.js ?       ????util ?           ????logger.js

    The manifest.json file describes what kind of app this is and is used by TIBCO Cloud Integration to carry out building and deploying your app. You should never modify this file, as you might cause the deployment or build step to fail.

    The package.json file contains the meta data of your application (like name, version, etc.) and also contains which modules need to be downloaded to make your app work.

    server.js is the main file of your application. By default the server will listen to port 8000 and that should not be changed.

    The .env file is used by Dotenv, a zero-dependency module that loads environment variables from a .env file into process.env. Storing configuration in the environment separate from code is based on The Twelve-Factor App methodology. By default we?ve put a single entry there for the HTTP port that you can use. As a best practice this is where you should put all your configuration variables

    Microsoft Visual Studio Code extension

    The extension for Microsoft Visual Studio Code that you can download from our GitHub page provides a whole bunch of useful commands that speed up development. From generating boilerplate code to creating the deployment artifacts (manifest.json and zip) for you.

    Best practices

    User Feedback

    Recommended Comments

    There are no comments to display.

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

  • Create New...