'node filename.js' command Where is it storing my data?

I am trying to connect my AngularJS app to the heroku database. I am following this guide here (http://nodeexamples.com/2012/09/21/connecting-to-a-postgresql-database-from-node-js-using-the-pg-module/) and I got to the very end and it even shows all of the data that I've created using the code "client.query(INSERT INTO...)" but my questions is, where in my actual directory is it storing my data? Even though I've connected via my heroku database's user, password, database, etc It doesn't show up on my heroku database that I connected with, however it is storing it somewhere.

My code in index.js

var pg = require('pg');

var client = new pg.Client({
    user: "herokudatabaseusername",
    password: "herokudatabasepassword",
    database: "herokudatabasebasename",
    port: 0000,
    host: "hostname",
    ssl: true
}); 
client.connect();

client.query('CREATE TABLE IF NOT EXISTS table(id integer, name varchar(64), description varchar(1024), type varchar(128), ...etc');
client.query('INSERT INTO table(id, name, description, type, ...etc) values($1, $2, $3, ...etc)', [ 1, 'someinfo', 'moreinfo', ...etc]);

var query = client.query('SELECT id, name, description, type, ...etc, FROM table ORDER BY name');
query.on('row', function (row, result) {
    result.addRow(row);
});
query.on('end', function (result) {
    console.log(JSON.stringify(result.rows, null, '    '));
    client.end();
});

Sample output after I run my 'node index.js' command in the terminal twice

[
    {
         "id": 1,
         "name": "...",
         "description": "...",
         "ect": "...",
         "ect": "...",
         ...
         ...
         ...
    },
    {
         "id": 1,
         "name": "...",
         "description": "...",
         "ect": "...",
         "ect": "...",
         ...
         ...
         ...
    }
]

So it seems as the data is persisting I'm just not sure where.

It looks like your code executes a query. It then iterates through the results, calling console.log for each line.

So it doesn't look like your app stores the results anywhere. It just logs them?

You'll probably see them fly by if you did a heroku logs --tail.

By the way, take care if you do plan to store stuff on the file system. The file system is ephemeral. So if you want to properly store it, use a backing service (like the database).