Skip to content

Commit

Permalink
[IMP] server.py direct in ampalibe run
Browse files Browse the repository at this point in the history
  • Loading branch information
gaetan1903 committed Feb 20, 2022
1 parent 4172ba4 commit f36bb80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion ampalibe/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
AMP_PORT=4555"""


server = """import core
server = """from conf import Configuration
import core
core.ampalibe.run(core.Configuration())
"""

Expand Down
9 changes: 4 additions & 5 deletions bin/ampalibe
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ if [ "$1" == "create" ]; then
python -c "import ampalibe;print(ampalibe.env)" > $2/.env
python -c "import ampalibe;print(ampalibe.conf)" > $2/conf.py
python -c "import ampalibe;print(ampalibe.core)" > $2/core.py
python -c "import ampalibe;print(ampalibe.server)" > $2/server.py
mkdir -p $2/assets/{public,private}
else
echo "Incorrect number of args for create"
Expand All @@ -21,7 +20,6 @@ elif [ "$1" == "init" ]; then
python -c "import ampalibe;print(ampalibe.env)" > .env
python -c "import ampalibe;print(ampalibe.conf)" > conf.py
python -c "import ampalibe;print(ampalibe.core)" > core.py
python -c "import ampalibe;print(ampalibe.server)" > server.py
mkdir -p assets/{public,private}
else
echo "Incorrect number of args for init"
Expand All @@ -30,11 +28,12 @@ elif [ "$1" == "init" ]; then
fi
elif [ "$1" == "run" ]; then
if [ $# -eq 1 ]; then
if ! [ -f "server.py" ]; then
echo "server.py not found\nPlease, go to your dir project."
if ! [ -f "core.py" ]; then
echo "core.py not found\nPlease, go to your dir project."
exit 1
fi
python server.py
source .env
python -c 'import core;core.ampalibe.run(core.Configuration())'
else
echo "Incorrect number of args for run"
exit 1
Expand Down

0 comments on commit f36bb80

Please sign in to comment.