Can I set up private pub server without Google Cloud?
Thanks!
No - the whole server is written to be run on google cloud infrastructure. You can of course write your own server implementing the api, but I guess that is not what you're asking about.
Can I set up private pub server without Google Cloud?
Yes and no. No: https://github.com/dart-lang/pub-dartlang-dart is designed to run on google cloud.
However, you can use https://github.com/dart-lang/pub_server which is considered the canonical server for APIs used by the pub client. You can see example backend repositories for it here:
https://github.com/dart-lang/pub_server/tree/master/example/src/examples
The later one is only to host the package contents, you won't get the web UI nor the package analysis bits out of it.
It's also possible to reference git tags from your pubspec:
https://www.dartlang.org/tools/pub/dependencies#git-packages
I haven't tried it with private git repositories.. if it doesn't I wonder if it would be hard to fix though...
If you really want a pub server, I know that there are others running pub-dartlang-dart behind a VPN, but I'm not sure exactly how they've configured things..
@koudle, actually, I'm curious what is you motivation?
I don't think we're likely to refactor pub-dartlang-dart, but if there is enough users, maybe it's not unrealistic to start a project to write a minimalistic standalone pub server...
@jonasfj
Hi,
* I want to run a private pub server,because:
1. I want to manage private packages, like private maven repositories
2. The others ways like git or pub server, although able to manage private packages, but no web UI
@koudle As you don't need the UI and the rest of it, you should take a look at the pub_server package I've linked to earlier. It provides an example to host the pub server on a local filesystem, which you can then use to host your private packages. pub client uses PUB_HOSTED_URL to target it instead of the public repository.
There are a lot of big companies that need a company's internal pub repository so that many departments share the flutter components, but these components can't be submitted to the central repository because they are related to the company's business.
@bobzhou80: package:pub_server has an example in its repository how to create a simple self-hosted version.
@bobzhou80, also checkout @v7lin's simple_pub_server, it's pretty cool.
Most helpful comment
There are a lot of big companies that need a company's internal pub repository so that many departments share the flutter components, but these components can't be submitted to the central repository because they are related to the company's business.