> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Node.js application error message: "Cannot GET" URL

> Learn how to resolve a problem that may occur when you try to run a Node.js application using cPanel's Node.js Selector.

This article discusses a problem that may occur when you try to run a Node.js application using cPanel's Node.js Selector.

## Problem

You create a Node.js application using [cPanel's Node.js Selector](/docs/create-application-with-nodejs-selector). When you try to view a page generated by the application, you receive the following error message:

```
Cannot GET /url/
```

In this error message, ***url*** represents the path you are trying to view.

## Cause

The Node.js Selector uses [Phusion Passenger](https://www.phusionpassenger.com) to manage Node.js applications. When you create an application in the Node.js Selector, Passenger uses the value in the **Application URL** text box to create the root path. For example, if the **Application URL** text box is set to **myapp**, then the root path for the application is not "*/*" but "*/myapp*".

<Note>
  This behavior is different from most other web environments, where "*/*" is typically the root path.
</Note>

## Resolution

To resolve this problem, you must include the application URL in your routes. The following code sample demonstrates how to do this using the popular [Express](http://expressjs.com) web application framework. It assumes that the **Application URL** text box in cPanel's Node.js Selector is set to **myapp**:

```javascript theme={null}
const express = require('express');
const app = express();

app.get('/myapp/', function(req, res){
    res.send("Hello from the root application URL");
});

app.get('/myapp/test/', function(req, res){
    res.send("Hello from the 'test' URL");
});

app.listen(0, () => console.log('Application is running'));
```

In this code sample, two routes are defined, */myapp* and */myapp/test*. If your domain name is *example.com*, and you use your web browser to view*[http://example.com/myapp](http://example.com/myapp)* or *[http://example.com/myapp/test](http://example.com/myapp/test)*, the pages load as expected. However, if you visit any other URL under*[http://example.com/myapp](http://example.com/myapp)*, you receive the **Cannot GET** error message.

## Related articles

* [Creating a Node.js application with cPanel using the Node.js Selector](/docs/create-application-with-nodejs-selector)

* [Migrating a Node.js application to Node.js Selector](/docs/migrating-a-node-js-application-to-node-js-selector)

* [Connecting to MySQL using Node.js](/docs/connecting-to-mysql-using-node-js)
