A custom data app is a Node.js project that can contain one or more custom data providers. A custom data app allows you to test your data providers without having to package and deploy them to ArcGIS Server.
Complete the following steps to create a custom data app.
-
Open a command prompt, and navigate to the directory where you want to create a custom data app.
-
Run the
cdf createapp <name
command. This creates a directory named with the value you supplied for <name>.> -
Open the newly created directory in an IDE of your choice. You should see the following folder structure.
Use dark colors for code blocks Copy - config/ | default.json - framework/ | cache-memory/ | core/ | featureserver/ | logger/ | output-geoservices/ | winnow/ - node_modules/ - src/ - request-handlers/ | welcome-page.js | index.js | plugins.js | routes.js - cdconfig.json - package-lock.json - package.json
-
To run the app, open a command prompt in the app directory.
- a. Using HTTP: Run the command
npm start
. You will see the message: Server is listening at 8080. - b. Using HTTPS: Run the command
npm start -- --port <port number
. You will see the message: Server listening at https://localhost:8080.> --self-signed-cert
- a. Using HTTP: Run the command