<commit_before>---
layout: post
title: AWS EC2 setup with node.js Part 2
description: "Create EC2 instance and install node.js."
tags: [ec2, ec2 instance, setup, node.js, npm, AWS, EBS]
excerpt_separator: "<!-- more -->"
image:
  background: witewall_3.png
---

###Install Express data on EBS volume

<!--more-->
If you followed the general guidelines up to step 3 in first section, you should have created, attached and mounted EBS volume on **/mnt/my-data**

We are going to follow guides from [Express](http://expressjs.com/starter/generator.html) website.  In terminal browse to directory you want your web application to be created.

For example the following will create `myapp`, web application skeleton, under **/mnt/my-data**.  If you want to install it under different directory change 

```shell
cd mnt/my-data
```
from belowe to anything you want.

In terminal:
{% highlight bash %}
cd /
cd mnt/my-data
sudo express myapp
{% endhighlight %}

After this install dependencies:

```shell
cd myapp && npm install
```

and run the app:

```bash
DEBUG=myapp ./bin/www
```<commit_msg>setup 2 code markdown edit<commit_after>---
layout: post
title: AWS EC2 setup with node.js Part 2
description: "Create EC2 instance and install node.js."
tags: [ec2, ec2 instance, setup, node.js, npm, AWS, EBS]
excerpt_separator: "<!-- more -->"
image:
  background: witewall_3.png
---

###Install Express data on EBS volume

<!--more-->
If you followed the general guidelines up to step 3 in first section, you should have created, attached and mounted EBS volume on **/mnt/my-data**

We are going to follow guides from [Express](http://expressjs.com/starter/generator.html) website.  In terminal browse to directory you want your web application to be created.

For example the following will create `myapp`, web application skeleton, under **/mnt/my-data**.  If you want to install it under different directory change 

{% highlight bash %}
cd mnt/my-data
{% endhighlight %}

from belowe to anything you want.

In terminal:

{% highlight bash %}
cd /
cd mnt/my-data
sudo express myapp
{% endhighlight %}

After this install dependencies:

{% highlight bash %}
cd myapp && npm install
{% endhighlight %}

and run the app:

{% highlight bash %}
DEBUG=myapp ./bin/www
{% endhighlight %}
{'fraction_non_alphanumeric': 0.11252747252747253, 'fraction_numerical': 0.006593406593406593, 'mean_word_length': 4.103139013452915, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3079346', 'n_tokens_mistral': 717, 'n_tokens_neox': 656, 'n_words': 296}