Question: I have been trying to do a csurf implementation on a personal project I have been working on. I have been searching google all over the place to try to figure out how to implement csurf on a form when I am not using a templating engine like Jade or EJS. My express server is also not directly rendering the pages but is mainly returning JSON. I have all of my front end being referenced like so

```
app.use(express.static(__dirname + '/www'));

```

my server code that is using the csurf looks like this

```
app.use(csurf());

app.use(function (req, res, next) {
    res.cookie('XSRF-TOKEN', req.csrfToken());
  next();
});

```

On the front end for the form the html input field looks like this. I am also using AngularJS and based on examples I have seen all I should have to do is this. 

```
<input type="hidden" name="_csrf" value="{{csrftoken}}">

```

I am getting the following error in the terminal

```
Error: invalid csrf token

```

If I inspect the hidden input this is what is displayed.

```
<input type="hidden" name="_csrf" value="">

```

Answer: 
After installing libaio-dev package on Ubuntu 14.04, please clean and build the fio again. The compilation will detect and pull your liabaio.

Steps to get over libaio issue on Ubuntu 14.04

1. Install libaio-dev
2. From you fio folder issue

*make clean*

and 

*make*
it is help me :

```
sudo apt-get install libaio-dev
cd fio
sudo ./configure  && sudo  make  &&  sudo make install
fio ...

```