GithubHelp home page GithubHelp logo

Comments (4)

nathfreder avatar nathfreder commented on July 19, 2024 2

I think that I've found a solution.

  1. Install chromium
npm install chromium
  1. Add the executablePath option to carlo.launch([options]) and set it to chromium.path
const carlo = require('carlo');
+ const chromium = require('chromium');

(async () => {
  // Launch the browser.
  const app = await carlo.launch({
+   executablePath: chromium.path,
  });

  // Terminate Node.js process on app window closing.
  app.on('exit', () => process.exit());

  // Tell carlo where your web files are located.
  app.serveFolder(__dirname);

  // Expose 'env' function in the web environment.
  await app.exposeFunction('env', _ => process.env);

  // Navigate to the main page of your app.
  await app.load('example.html');
})();
  1. Package your application
npx pkg index.js

🥳 You're done!

from carlo.

frankhale avatar frankhale commented on July 19, 2024 1

I was also wondering this same thing. Would love if there is a way to package with Chrome so that people that have not installed it can easily run my apps.

from carlo.

frankhale avatar frankhale commented on July 19, 2024 1

Oh nice! Definitely gonna try this. Thank you!

from carlo.

nathfreder avatar nathfreder commented on July 19, 2024

Keep in mind that it hasn't been properly tested, just quickly tried.

from carlo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.