a month ago
I have installed snap of cpp hello world basic example from examples of sdk automation on virtual ctrlx works, it installed successfully, but now showing in sidebar,
secondly how to run this on ctrlx vm ?
Solved! Go to Solution.
a month ago
Hello jawad,
could you please have a look in the readme --- there is not sidebar-integrated item/info. The hello World is printed in the log-book info.
https://github.com/boschrexroth/ctrlx-automation-sdk/tree/main/samples-cpp/hello.world
Bye
a month ago - last edited a month ago
All this example does is print out "Hello World" to the diagnostic logbook. This should happen automatically upon installation. See the associated README.md.
a month ago
Ok. now if i have nodejs based application, how i can run it on ctrlx works.
for example i have following routes in my nodejs app,
app.get('/items', (req, res) => {
res.send('Hello, Express!')
});
how i can run or test this routes ?
3 weeks ago
Jawad,
You have to create a snap and then implement your nodeJS snapp. 😃, You have to dump your code inside the app with the dump Plugin
and then modify the HELLOWORD to run "node yourapp.js"
so basically:
- have the app the works locally
- include in the app the nodejs binaries (already done in helloword)
- modify the app to start your code at boot.
https://snapcraft.io/docs/dump-plugin
This is my structure:
the code folder:
the wrapper
my app with the code imported:
I am planning to make an how-to out of this but there will be no more informaitons than what is written here.
Mauro
3 weeks ago
ok. how I can run my snap app on CtrlX works virtual core after installation.
let say I have this route written in my code
2 weeks ago
Thanks @Mauro
I achevied this simply by accessing ip address defined in virtual ctrlx, port and routes defined in code.