# Installation ## Trying out Marko If you just want to play around with Marko in the browser, head on over to our [Try Online](https://markojs.com/try-online) feature. You'll be able to develop a Marko application right in your browser. ## Creating new apps If you're starting from scratch, [`marko-cli`](https://github.com/marko-js/cli) provides a starter app to get you going quickly. To get started: ```bash npm install marko-cli --global marko create hello-world cd hello-world npm start ``` ## Direct usage ### Installing The Marko compiler runs on [Node.js](https://nodejs.org/) and can be installed using [npm](https://www.npmjs.com/package/marko): ``` npm install marko ``` or using [yarn](https://yarnpkg.com): ``` yarn add marko ``` ### In the browser Let's say we have a simple view that we want to render in the browser: `hello.marko` _hello.marko_ ```marko

Hello ${input.name}

``` First, let's create a `client.js` that requires the view and renders it to the body: _client.js_ ```js var helloComponent = require("./hello"); helloComponent.renderSync({ name: "Marko" }).appendTo(document.body); ``` We will also create a barebones HTML page to host our application: _index.html_ ``` Marko Example ``` Now, we need to bundle these files for use in the browser. We can use a tool called [`lasso`](https://github.com/lasso-js/lasso) to do that for us, so let's get it (and the marko plugin) installed: ``` npm install --global lasso-cli npm install --save lasso lasso-marko ``` Now we can build our bundle for the browser: ``` lasso --main client.js --plugins lasso-marko --inject-into index.html ``` This builds a `client.js` file to the newly created `static/` directory and injects the required `