Skip to content

Commit

Permalink
modified cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
tushargarg0987 committed Jul 31, 2024
1 parent 84a241a commit a747ff2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/cicd-nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
name: Deploy Nodejs to Azure App Service
name: Deploy Node.js to Azure App Service

on:
push:
branches:
push:
branches:
- final-submission

jobs:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3

- name: Setup Node.js version
uses: actions/setup-node@v4
with:
with:
node-version: '20.x'

- name: Install Dependencies
run: npm install
run: |
cd server
npm install
- name: Deploy to Azure App Service
uses: azure/webapps-deploy@v2
with:
app-name: smartbarodanode
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: server
package: server
2 changes: 1 addition & 1 deletion server/controllers/authController.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ exports.login = async (req, res) => {
}

const payload = { user: { id: user.id, accNo: user.accNo } };
jwt.sign(payload, 'secret', { expiresIn: '1h' }, (err, token) => {
jwt.sign(payload, 'secret', { expiresIn: '10d' }, (err, token) => {
if (err) throw err;
res.json({ token });
});
Expand Down

0 comments on commit a747ff2

Please sign in to comment.