Skip to content

Commit

Permalink
FIxed actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
print-Sathvik committed Mar 8, 2024
1 parent 68fe23e commit c63d591
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 25 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
containerize:
name: Build and push Docker image to Docker Hub
needs: run-tests
runs-on: ubuntu-latest
steps:
- name: Check out the repo
Expand Down
22 changes: 0 additions & 22 deletions config/config.js

This file was deleted.

20 changes: 20 additions & 0 deletions config/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"development": {
"username": "postgres",
"password": "postgres",
"database": "wd-todo-dev",
"host": "127.0.0.1",
"dialect": "postgres"
},
"test": {
"username": "postgres",
"password": "postgres",
"database": "wd-todo-test",
"host": "127.0.0.1",
"dialect": "postgres"
},
"production": {
"use_env_variable": "DATABASE_URL",
"dialect": "postgres"
}
}
6 changes: 3 additions & 3 deletions models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const Sequelize = require("sequelize");
const process = require("process");
const basename = path.basename(__filename);
const env = process.env.NODE_ENV || "development";
require('dotenv').config({ path: `.env.${process.env.NODE_ENV}` })
const config = require(__dirname + "/../config/config.js")[env];
// const config = require(__dirname + "/../config/config.json")[env];
// require('dotenv').config({ path: `.env.${process.env.NODE_ENV}` })
// const config = require(__dirname + "/../config/config.js")[env];
const config = require(__dirname + "/../config/config.json")[env];
const db = {};

let sequelize;
Expand Down

0 comments on commit c63d591

Please sign in to comment.