Challenge: Create a CommandLine App
Summary
By completing this you will learn how to:
- Create a small command line app
- Use supplied code to query an iModel Snapshot
Setup
-
Install the required tools
-
That’s it!
Goals
Goal Follow the instructions to create your own skeleton command line app with queries an iModel Snapshot and outputs a list of categories.
Bonus goal Modify the app to query for views instead.
Solution
The best way to learn is by doing! But, if you want to skip ahead you can go right to the full solution.
Instructions
- The full instructions are here: Writing Command Line Applications with iModel.js. All you need to do is follow along with the blog post. You will create a few files, cut-and-paste some code, then install, build, and run your own command line app.
Instructions for bonus goal
-
See if you can modify the app so that it prints out a list of views, instead of a list of categories. Easy peasy!
If you need help try these hints.
- Try some experiments. What data is interesting to you?
Conclusion
So, were you up to the challenge? Check out how we solved it by viewing our full solution. Let us know if you have a better way.
Feedback is welcome! Let us know via the iModel.js community.