GithubHelp home page GithubHelp logo

bturner1908 / sample-node-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from habitat-sh/sample-node-app

0.0 2.0 0.0 35 KB

Sample Node App to Habitize!

JavaScript 68.36% Shell 4.52% CSS 15.15% HTML 11.97%

sample-node-app's Introduction

Habitat Sample Node App

Welcome to the Habitat Sample Node App!

habitat-sample-node-app

Instructions

To practice packaging/running this app with Habitat

Workstation Prereqs:

$  git clone https://github.com/habitat-sh/sample-node-app.git
  • Change directories
$ cd sample-node-app

Building the Package:

You'll see a directory called habitat. Open the habitat/plan.sh file:

Your habitat/plan.sh should look like this:

pkg_name=sample-node-app
pkg_origin=your_origin
pkg_scaffolding="core/scaffolding-node"

Let's add in a version number

pkg_name=sample-node-app
pkg_origin=your_origin
pkg_scaffolding="core/scaffolding-node"
pkg_version="1.0.1"

Now save and close the file.

Enter the Habitat Studio

$ hab studio enter

And run build

(studio) $ build

Running the Package with Docker

Still in your studio, right after the build, export that package to a docker image

(studio) $ hab pkg export docker ./results/<habitat artifact>.hart

Then exit out of the studio:

(studio) $ exit

Now start a Docker container from that image.

$ docker run -it -p 8000:8000 your_origin/sample-node-app

Now head to http://localhost:8000 and see your running app!

sample-node-app's People

Contributors

nellshamrell avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.