{"id":222,"date":"2022-05-05T16:15:00","date_gmt":"2022-05-05T16:15:00","guid":{"rendered":"https:\/\/felixaugenstein.com\/blog\/?p=222"},"modified":"2022-05-05T16:15:02","modified_gmt":"2022-05-05T16:15:02","slug":"deploy-a-node-js-app-using-express-js-from-a-repository-source-code-to-code-engine","status":"publish","type":"post","link":"https:\/\/felixaugenstein.com\/blog\/deploy-a-node-js-app-using-express-js-from-a-repository-source-code-to-code-engine\/","title":{"rendered":"Deploy a Node.js app using Express.js from a repository source code to Code Engine"},"content":{"rendered":"\n<p>You can deploy your Node.js application directly from source code using the UI or the console. In this tutorial we will use the Code Engine UI on the IBM Cloud.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Open the\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/cloud.ibm.com\/codeengine\/overview\" target=\"_blank\">Code Engine<\/a>\u00a0console.<\/li><li>Select\u00a0<strong>Start with source code<\/strong> and enter your GitHub repository, click start creating.<\/li><li>Select\u00a0<strong>Application<\/strong>.<\/li><li>Enter a name for the application. Use a name for your application that is unique within the project.<\/li><li>Select a project from the list of available projects. If you don&#8217;t have a project,\u00a0<a href=\"https:\/\/cloud.ibm.com\/docs\/codeengine?topic=codeengine-manage-project#create-a-project\" target=\"_blank\" rel=\"noreferrer noopener\">create a new one<\/a>. Note that you must have a selected project to deploy an app.<\/li><li>Select\u00a0<strong>Source code<\/strong>. Make sure the link to your GitHub repository is correct.<\/li><li>Click\u00a0<strong>Specify build details<\/strong>.<\/li><li>Select a source repository, for example,\u00a0<code>https:\/\/github.com\/IBM\/CodeEngine<\/code>. If you are using a public repository that does not require credentials, select\u00a0<code>None<\/code>\u00a0for the Code repo access &#8211; in case of a private repository please provide the SSH URL. You can optionally provide a branch name. If you do not provide a branch name and you leave the field empty, Code Engine automatically uses the default branch of the specified repository. Click\u00a0<strong>Next<\/strong>.<\/li><li>Select a strategy for your build and resources for your build. For this tutorial let&#8217;s choose &#8220;<a rel=\"noreferrer noopener\" href=\"https:\/\/cloud.ibm.com\/docs\/codeengine?topic=codeengine-plan-build#build-buildpack-strat\" target=\"_blank\">Cloud Native Buildpack<\/a>&#8220;. Don&#8217;t change Timeout and Build resources for now. Click\u00a0<strong>Next<\/strong>.<\/li><li>Select a container registry location \/ server, such as\u00a0<code>IBM Registry, Frankfurt<\/code>\u00a0to specify where to store the image of your build output.<\/li><li>Leave Registry access secret at Code Engine managed secret, namespace at the default namespace and the repository (image name) also at the default value.<\/li><li>Click\u00a0<strong>Done<\/strong>.<\/li><li>Modify any runtime settings or environment variables for your app. For more information about these options, see\u00a0<a href=\"https:\/\/cloud.ibm.com\/docs\/codeengine?topic=codeengine-application-workloads#optionsdeploy\" target=\"_blank\" rel=\"noreferrer noopener\">Options for endpoint visibility of apps<\/a>\u00a0and\u00a0<a href=\"https:\/\/cloud.ibm.com\/docs\/codeengine?topic=codeengine-application-workloads#optionsdeploy\" target=\"_blank\" rel=\"noreferrer noopener\">Options for deploying an app<\/a>.<\/li><li>You can leave the port at the default value 8080 or change it and let&#8217;s choose a public endpoint.<\/li><li>Click\u00a0<strong>Create<\/strong>.<\/li><li>After your build run is submitted, the built container image is sent to Container Registry and then your application pulls the image and deploys for you. After the application status changes to\u00a0<strong>Ready<\/strong>, you can test the application. Click\u00a0<strong>Test application<\/strong>\u00a0and then click\u00a0<strong>Application URL<\/strong>.<\/li><\/ol>\n\n\n\n<p>Now that you have deployed your application, you can view information about application revisions and any running instances, and configuration details. After the build you can still change environment variables such as Api Keys, or go to Configuration revisions and click &#8220;Edit and create new revision&#8221; to restart the building process, in case you make any new commits to your repository.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can deploy your Node.js application directly from source code using the UI or the console. In this tutorial we will use the Code Engine UI on the IBM Cloud. Open the\u00a0Code Engine\u00a0console. Select\u00a0Start with source code and enter your GitHub repository, click start creating. Select\u00a0Application. Enter a name for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":224,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,45,44,30],"tags":[],"class_list":["post-222","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-application","category-code-engine","category-express-js","category-node-js"],"_links":{"self":[{"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/posts\/222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/comments?post=222"}],"version-history":[{"count":5,"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/posts\/222\/revisions"}],"predecessor-version":[{"id":228,"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/posts\/222\/revisions\/228"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/media\/224"}],"wp:attachment":[{"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/media?parent=222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/categories?post=222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/tags?post=222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}