First install npm
for example using Conda:
conda env create -f environment.yml
conda activate npm
Install dependencies:
npm install
Then build the website:
./build.py
Finally serve a local version using:
npm run dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.js
. The page auto-updates as you edit the file.
This feature allows users to load source code into the text box by providing either a URL or a GitHub Gist. It simplifies the process of compiling and running code from external sources, making it convenient for users to test and share code effortlessly.
https://dev.lfortran.org/?code=<URL-encoded code>
.https://dev.lfortran.org/?code=program%20hello%0A%20%20!%20This%20is%20a%20comment%20line%3B%20it%20is%20ignored%20by%20the%20compiler%0A%20%20print%20*%2C%20%27Hello%2C%20World!%27%0Aend%20program%20hello%0A
https://dev.lfortran.org/?gist=<GitHub username>/<Gist ID>
.https://dev.lfortran.org/?gist=certik/7e2652943bbff7f0d0963dd4fcf1813a
code
parameter is given preference. Only the code provided via the code
parameter will be considered for compilation.This feature enhances the versatility of the LFortran compiler, enabling users to seamlessly compile and run Fortran code from external sources without needing to download or manage local files.
To learn more about Next.js, take a look at the following resources: