You load your JSON data in the config
object, then you do nothing with this object.
I suppose you want to pass this config in the HTML file in order to configure the jqgrid plugin (that I don't know BTW).
In this case you should use a templating language to generate a dynamic page (EJS will be more familiar for you if you have previously done PHP, else you should keep - for now - the default one, jade) and pass your config object to the template you made from your HTML.
To illustrate:
...
app.set('view engine', 'ejs');//Don't forget to install the ejs module
app.get('/',function(req,res) {
res.render(__dirname + '/griddemo.ejs', {jqgridConfig: config})
})
...
app.js
...
<script>
var jqgrid_config = <%- JSON.stringify(jqgridConfig) %>;
</script>
...
griddemo.ejs
If you don't already know the express app generator, you should better use it, it will highly help you to understand the concepts you need in order to render a dynamic page with Express.
Another way to do the job without generate dynamic pages is to put data.json
in /public
and to load this JSON file from griddemo.html
(see how to use json file in html code)