# quick node.js express redis user management &#8211; 1

Date: 2016-12-27

<p dir="ltr">
  I needed a user management system and a reason to use redis, So I decided to combine them both.
</p>

<p dir="ltr">
  this post will be about the stack installation
</p>

<p dir="ltr">
  for the building of the user management itself go to <a href="http://goldmanmalka.com/2017/01/22/quick-node-js-express-redis-user-management-2/">part 2</a> of this guide
</p>

<p dir="ltr">
  <!--more-->
</p>

##  what do we need

<p dir="ltr">
  linux  &#8211; Debian or Ubuntu
</p>

<p dir="ltr">
  node.js
</p>

<p dir="ltr">
  redis
</p>

<p dir="ltr">
  mongodb
</p>

## Stack installation

<p dir="ltr">
  We&#8217;ll start with clean Debian or Ubuntu installation.
</p>

### node.js

<pre><code class="language-bash">sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
</code></pre>

### Express

<pre>sudo npm i express -g</pre>

### MongoDB

<p dir="ltr">
  <a href="https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/">https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/</a>
</p>

### Redis

<https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04>

<p dir="ltr">
  # from another trerminal redis-cli ping<br /> # if he answer pong it&#8217;s great
</p>

### Some nice to have helpers

<pre>sudo npm i nodemon -g

</pre>

## App creation

<pre>express myapp
cd myapp && npm install</pre>

## Dependencies

<pre>npm i express-session --save
npm i connect-redis --save
npm i mongoskin --save
npm i mongodb --save

</pre>

## Run

<pre>nodemon bin/www</pre>

<p dir="ltr">
  and now we can surf to localhost:3000 and see express hello world
</p>

<p dir="ltr">
  in the second part we&#8217;ll write some node.js code to manage the users.
</p>
