
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@cocalc/hub
Advanced tools
This code is part of https://github.com/sagemathinc/cocalc and isn't currently designed to be used standalone. Our plan is to refactor this code into smaller useful modules that are published under the @cocalc npm organization.
This is a node.js process that serves all of the following (possibly simultaneously):
Run the dev server, suitable for use inside a CoCalc project:
npm run hub-project-dev
Just set either the BASE_PATH or PORT environment variables when starting thehub, and it will use what you set. If you do not set a BASE_PATH it uses either"/" by default, or something involving the project id if you're inside a CoCalcproject.
If you don't set the PORT then 5000 is used by default. The only way to set the port is via the PORT environment variable.
You can use the --hostname
command line options if you are starting the hub directly via the cocalc-hub-server
script and need to specify a different interface (e.g., 0.0.0.0 instead of localhost).
As a quick test, you can do
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./selfsigned.key -out selfsigned.crt
to create self-signed key and cert. You can then start the hub with these two files as options:
cd packages/hub; npx cocalc-hub-server ... --https-key=./selfsigned.key --https-cert=./selfsigned.crt
and the hub will use https instead of http. Simple as that.
FAQs
CoCalc: Backend webserver component
The npm package @cocalc/hub receives a total of 310 weekly downloads. As such, @cocalc/hub popularity was classified as not popular.
We found that @cocalc/hub demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.