Browse Source

cloud and hero install script ready

master
filesite 1 year ago
parent
commit
76ce64de21
  1. 2
      .gitignore
  2. 11
      install_cloud.sh
  3. 8
      install_hero.sh
  4. 6
      package.json
  5. 9
      test/cloud_test.mjs
  6. 14
      test/start_cloud.mjs

2
.gitignore vendored

@ -0,0 +1,2 @@
package-lock.json
node_modules/

11
install_cloud.sh

@ -0,0 +1,11 @@
#!/bin/sh
# install cloud
npm i --save @ulixee/cloud
# start cloud
npx @ulixee/cloud start
echo "Manual url:"
echo "https://ulixee.org/docs/cloud/"

8
install_hero.sh

@ -0,0 +1,8 @@
#!/bin/sh
# install hero
npm i --save @ulixee/hero
echo "Manual url:"
echo "https://ulixee.org/docs/hero/"

6
package.json

@ -0,0 +1,6 @@
{
"dependencies": {
"@ulixee/cloud": "^2.0.0-alpha.24",
"@ulixee/hero": "^2.0.0-alpha.24"
}
}

9
test/cloud_test.mjs

@ -0,0 +1,9 @@
import Hero from '@ulixee/hero';
(async () => {
const hero = new Hero({ connectionToCore: 'ws://192.168.3.13:1818' });
await hero.goto('https://filesite.io');
const title = await hero.document.title;
console.log('Page title', title);
await hero.close();
})();

14
test/start_cloud.mjs

@ -0,0 +1,14 @@
//Documents: https://ulixee.org/docs/cloud/modules/cloud-node#constructor
import { CloudNode } from '@ulixee/cloud';
(async () => {
const cloudNode = new CloudNode({
port: 1818,
cloudType: 'private'
});
await cloudNode.listen();
console.log(`CloudNode started on port ${await cloudNode.port}`);
})().catch(error => {
console.log('ERROR starting Ulixee CloudNode', error);
process.exit(1);
});
Loading…
Cancel
Save