Skip to content

Commit

Permalink
fileshare api
Browse files Browse the repository at this point in the history
  • Loading branch information
imrany committed Aug 17, 2023
0 parents commit ee28ea7
Show file tree
Hide file tree
Showing 32 changed files with 2,732 additions and 0 deletions.
Empty file added .env.example
Empty file.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
build
.env
uploads
11 changes: 11 additions & 0 deletions commands
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/bash

MYIP=$(ip route get 8.8.8.8 | awk '{print $7; exit}')

if [ "$MYIP" == "" ]
then
echo "Please connect your machine to a network"
else
echo "Your server would run on http://$MYIP:8000"
npx nodemon
fi
25 changes: 25 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
all: build copy
# .DEFAULT_GOAL:=build
# .PHONY: build copy
# variable
B= npm

build:
@echo 'building app...'
rm -rf ./build&&npx tsc

clean:
@echo 'removing build dir..'
rm -rf ./build

dev:
@echo 'starting dev server'
${B} run dev

copy:
@echo 'copying views to build dir...'
cp -r ./views ./build

host:
@echo 'Finding device ip address...'
bash ./commands
6 changes: 6 additions & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"watch": ["src"],
"ext": ".ts,.js",
"ignore": [],
"exec": "npx ts-node src/index.ts"
}
Loading

0 comments on commit ee28ea7

Please sign in to comment.