Skip to content

Commit

Permalink
Merge pull request #1 from Byte-Boost/sprint-1
Browse files Browse the repository at this point in the history
Sprint 1 - Finished
  • Loading branch information
MarkVN2 committed Apr 14, 2024
2 parents 1db77e8 + c127e8c commit 78b8b5c
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Frontend_Nebulon
Submodule Frontend_Nebulon updated 48 files
+6 −0 .env.example
+25 −0 README.md
+1,009 −132 package-lock.json
+18 −3 package.json
+9 −0 public/Nebulon_icon.svg
+ public/nebulon_cover.png
+ public/nebulon_icon.png
+0 −1 public/next.svg
+0 −1 public/vercel.svg
+76 −22 src/app/globals.css
+1 −1 src/app/layout.tsx
+67 −0 src/json/test.json
+48 −0 src/modules/bar_chart/index.tsx
+128 −0 src/modules/client_table_row/index.tsx
+10 −0 src/modules/content_area/index.tsx
+17 −0 src/modules/graph_card/index.tsx
+65 −0 src/modules/login_card/index.tsx
+12 −0 src/modules/quick_card/index.tsx
+13 −0 src/modules/quick_card_icons/client_icon/index.tsx
+13 −0 src/modules/quick_card_icons/commision_icon/index.tsx
+32 −0 src/modules/quick_card_icons/graphs_icon/index.tsx
+13 −0 src/modules/quick_card_icons/product_icon/index.tsx
+13 −0 src/modules/quick_card_icons/seller_icon/index.tsx
+24 −0 src/modules/quick_card_icons/tables_icon/index.tsx
+39 −0 src/modules/register/index.tsx
+27 −0 src/modules/sidebar/index.tsx
+32 −0 src/modules/sidebar_icons/add_icon/index.tsx
+30 −0 src/modules/sidebar_icons/dashboard_icon/index.tsx
+22 −0 src/modules/sidebar_icons/home_icon/index.tsx
+25 −0 src/modules/sidebar_icons/logout_icon/index.tsx
+24 −0 src/modules/sidebar_icons/options_icon/index.tsx
+23 −0 src/modules/sidebar_item/index.tsx
+30 −0 src/modules/topbar/index.tsx
+26 −0 src/modules/upload_card/index.tsx
+57 −0 src/pages/adicionar/cliente.tsx
+62 −0 src/pages/adicionar/comissao.tsx
+56 −0 src/pages/adicionar/index.tsx
+56 −0 src/pages/adicionar/produto.tsx
+55 −0 src/pages/adicionar/vendedor.tsx
+70 −0 src/pages/dashboard/comissao.tsx
+35 −0 src/pages/dashboard/graph.tsx
+41 −0 src/pages/dashboard/index.tsx
+47 −0 src/pages/home.tsx
+9 −108 src/pages/index.tsx
+27 −0 src/scripts/requests/instance.ts
+55 −0 src/scripts/xlsxUtils/xlsxToDict.js
+32 −0 src/scripts/xlsxUtils/xlsxToJSON.ts
+1 −1 tsconfig.json
26 changes: 26 additions & 0 deletions run.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# PowerShell
try {
# Start backend server
Set-Location -Path .\Backend_Nebulon
npm install
$server1 = Start-Process -NoNewWindow -FilePath "npm" -ArgumentList "run", "start" -PassThru

# Move to root directory
Set-Location -Path ..\

# Start frontend server
Set-Location -Path .\Frontend_Nebulon
npm install
$server2 = Start-Process -NoNewWindow -FilePath "npm" -ArgumentList "run", "dev" -PassThru

# Wait indefinitely
while($true) { Start-Sleep -Seconds 60 }
}
finally {
# Move to root directory
Set-Location -Path ..\
# Function to be executed upon receiving SIGINT
Write-Host "Caught SIGINT. Cleaning up..."
Stop-Process -Id $server1.Id -Force
Stop-Process -Id $server2.Id -Force
}
21 changes: 21 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Bash
# Function to be executed upon receiving SIGINT
cleanup() {
echo "Caught SIGINT. Cleaning up..."
kill $server_pid1 $server_pid2 # Terminates both server processes
exit
}

# Set up the trap
trap cleanup SIGINT

# Start backend server
cd Backend_Nebulon & npm install && npm run start &
server_pid1=$! # Get the process ID of the last backgrounded command

# Start frontend server
cd ./Frontend_Nebulon && npm install && npm run dev &
server_pid2=$! # Get the process ID of the last backgrounded command

# Wait indefinitely. The cleanup function will handle interruption and cleanup.
wait

0 comments on commit 78b8b5c

Please sign in to comment.