Skip to content

Commit

Permalink
- general adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
jprogram committed Jul 22, 2024
1 parent 167b865 commit 538b8fb
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
source ../venv/bin/activate
source venv/bin/activate
pytest --disable-warnings
build-frontend:
Expand All @@ -67,6 +67,9 @@ jobs:
working-directory: ./frontend
run: npm run build

- name: List files
run: ls -la ./frontend/dist

deploy-frontend:
runs-on: ubuntu-latest
needs: build-frontend
Expand Down
8 changes: 6 additions & 2 deletions backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
from flask_jwt_extended import JWTManager
from log_config import setup_logging

def create_app():
def create_app(test_config=None):
app = Flask(__name__)
app.config.from_object(Config)

if test_config:
app.config.update(test_config)
else:
app.config.from_object(Config)

# Inicializa o MongoDB
init_mongo(app)
Expand Down
5 changes: 2 additions & 3 deletions backend/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@

@pytest.fixture
def app():
app = create_app()
app.config.update({
app = create_app({
"TESTING": True,
"MONGO_URI": 'mongodb://localhost:27017/jreport'
"MONGO_URI": os.getenv('MONGO_URI', "mongodb://localhost:27017/jprogram")
})
return app

Expand Down
5 changes: 5 additions & 0 deletions frontend/vue.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
outputDir : 'dist',
publicPath: process.env.NODE_ENV === 'production' ? '/jreport/' : '/'
}

4 changes: 2 additions & 2 deletions run/backend.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ if not exist "%diretorioVerificar%venv" (

cd /d "%diretorioVerificar%"

::
call venv\Scripts\activate

python -m pip install --upgrade pip

pip install -r requirements.txt

python app.py
Expand All @@ -24,4 +25,3 @@ python app.py
pause

endlocal
pause

0 comments on commit 538b8fb

Please sign in to comment.