Run Interchange under Plack
This may not be the fastest way to run Interchange, but if you need a quick-and-dirty local development instance, it can't be beat.
To run this in production, you'll probably want to proxy it with Nginx,
and you should have a startup/shutdown script for
First, you'll need
Then Plack and a few middlewares:
cpanm Plack Plack::Builder Plack::App::WrapCGI Plack::Middleware::Static Plack::Middleware::ForceEnv CGI::Emulate::PSGI CGI::Compile Starman
Copy the psgi file to your Interchange root:
cp app.psgi /path/to/interchange/
and customize it.
Customize your catalog's
products/variable.txt or copy
products/site.txt to your catalog and adjust the
Mall No in your
Don't forget to run your
bin/compile_link to create the "vlink" file:
cd /path/to/interchange/ ./bin/compile_link
starman --listen :5001 --workers 1 --daemonize /path/to/interchange/app.psgi
Extra credit 1: use a ".test" domain on your local box
dnsmasq and then run the
dnsmasq.sh command as root.
site.txt to use the ".test" domain of your choosing (plus port
number), e.g. http://strap.test:5001
Extra credit 2: expose your local server to the internet
Install ngrok and run with:
ngrok http 5001
Alter the server variables in
site.txt to use the provided hostname,
and restart or reconfigure Interchange.
Share with friends, clients, or coworkers.