···11/**
22 * The main bootstrap script for loading pyodide.
33 */
44+const port = process.env.PORT || 1212;
55+66+export const languagePluginLoader = new Promise((resolve, reject) => {
4755-var languagePluginLoader = new Promise((resolve, reject) => {
66- // This is filled in by the Makefile to be either a local file or the
77- // deployed location. TODO: This should be done in a less hacky
88- // way.
99- var baseURL = 'http://localhost:1212/src/';
88+ var baseURL = 'http://localhost:' + port + '/src/';
109 // var baseURL = self.languagePluginUrl || 'https://iodide.io/pyodide-demo/';
1110 baseURL = baseURL.substr(0, baseURL.lastIndexOf('/')) + '/';
1211···359358 }, () => {});
360359 }, () => {});
361360});
362362-// languagePluginLoader