Elliot Schrock
Elliot Schrock

Reputation: 1425

Vapor 3 on Heroku: REPL?

Is there a way to get access to a REPL on Heroku in Vapor 3? If so, how?

I've tried heroku run swift run --repl, but Heroku replies: bash: swift: command not found.

Upvotes: 3

Views: 80

Answers (1)

vzsg
vzsg

Reputation: 2896

That's unfortunately not possible. The Swift toolchain is not part of the application image (slug), because it would overshoot the size limit, and does not add anything useful when running the application itself.

If you want to experiment with Swift on Linux without installing Linux yourself, I'd suggest installing Docker. Once you have it set up, the following command will give you a REPL:

docker run --rm -it --privileged swift:latest swift

Upvotes: 3

Related Questions