Skip to content
Zach Pifer edited this page Feb 17, 2023 · 1 revision
  1. Create new directory to house backend and frontend
mkdir newDir
  1. Run the Julia template file to create a new Julia package for the backend
using PkgTemplates

macro template()
    return :(Template(;
    user="zapif",
    dir=".",
    plugins = [!Git])
    )
end
print("Enter package name: ")
name = readline()
generate(name, @template)
mkdir(joinpath(name, "bin"))
touch(joinpath(name, "bin", "main.jl"))
  1. Create the Svelte frontend
npm create vite@latest                
  1. Create frontend using Svelte and once finished, build the project and copy it to the correct /var/www/html directory
npm run build
sudo cp -rf dist/* /var/www/html/infobank/
  1. Create the .conf file for the project and copy it to /etc/nginx/conf.d
server {
	listen 97;
	listen [::]:97;
	root /var/www/html/form;
	index index.html index.htm index.nginx-debian.html

	server_name svelte.com;

	location /api/create/ {
		proxy_pass http://localhost:8081;
	}
}
  1. Create the backend using the Julia module created and start it by running the bin/main.jl file using julia bin/main.jl
main.jl

using Backend

Backend.main()
  1. Navigate to the localhost port specified in the conf file to see application
Clone this wiki locally