-
Notifications
You must be signed in to change notification settings - Fork 0
Setup
Zach Pifer edited this page Feb 17, 2023
·
1 revision
- Create new directory to house backend and frontend
mkdir newDir
- 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"))
- Create the Svelte frontend
npm create vite@latest
- 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/
- 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;
}
}
- 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()
- Navigate to the localhost port specified in the conf file to see application