-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WAR-314 Include docker build scripts in nodejs seeds.
- Loading branch information
Showing
8 changed files
with
109 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
backend/node-js-express/node-js-express-mongoose/webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
mode: 'production', | ||
entry: './server.js', | ||
output: { | ||
path: path.join(__dirname, 'dist'), | ||
publicPath: '/', | ||
filename: 'main.js', | ||
}, | ||
module: { | ||
rules: [{ | ||
test: /\.js?$/, | ||
exclude: /node_modules/ | ||
}] | ||
}, | ||
resolveLoader: { | ||
modules: [ | ||
__dirname + '/node_modules' | ||
] | ||
}, | ||
target: 'node', | ||
}; |
24 changes: 13 additions & 11 deletions
24
backend/node-js-express/node-js-express-postgresql/app/config/database.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
const pg = require('pg'); | ||
const { Sequelize } = require('sequelize'); | ||
|
||
const sequelize = new Sequelize(process.env.POSTGRES_DATABASE, process.env.POSTGRES_USER, process.env.POSTGRES_PASSWORD, { | ||
host: process.env.POSTGRES_HOST, | ||
dialect: 'postgres', | ||
port: process.env.POSTGRES_PORT || 5432, | ||
dialectOptions: { | ||
// Remove or comment out the ssl property if it's not supported by your PostgreSQL server | ||
// ssl: { | ||
// require: process.env.POSTGRES_SSL === 'true', // Whether to require SSL | ||
// rejectUnauthorized: process.env.POSTGRES_SSL === 'true' // Whether to reject self-signed certificates | ||
// // Note: rejectUnauthorized should be set to true in production for security reasons | ||
// } | ||
} | ||
host: process.env.POSTGRES_HOST, | ||
dialect: 'postgres', | ||
dialectModule: pg, | ||
port: process.env.POSTGRES_PORT || 5432, | ||
dialectOptions: { | ||
// Remove or comment out the ssl property if it's not supported by your PostgreSQL server | ||
// ssl: { | ||
// require: process.env.POSTGRES_SSL === 'true', // Whether to require SSL | ||
// rejectUnauthorized: process.env.POSTGRES_SSL === 'true' // Whether to reject self-signed certificates | ||
// // Note: rejectUnauthorized should be set to true in production for security reasons | ||
// } | ||
} | ||
}); | ||
|
||
module.exports = sequelize; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
backend/node-js-express/node-js-express-postgresql/webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
mode: 'production', | ||
entry: './server.js', | ||
output: { | ||
path: path.join(__dirname, 'dist'), | ||
publicPath: '/', | ||
filename: 'main.js', | ||
}, | ||
module: { | ||
rules: [{ | ||
test: /\.js?$/, | ||
exclude: /node_modules/ | ||
}] | ||
}, | ||
resolveLoader: { | ||
modules: [ | ||
__dirname + '/node_modules' | ||
] | ||
}, | ||
target: 'node', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
backend/node-js-express/node-js-express-starter/webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
mode: 'production', | ||
entry: './server.js', | ||
output: { | ||
path: path.join(__dirname, 'dist'), | ||
publicPath: '/', | ||
filename: 'main.js', | ||
}, | ||
module: { | ||
rules: [{ | ||
test: /\.js?$/, | ||
exclude: /node_modules/ | ||
}] | ||
}, | ||
resolveLoader: { | ||
modules: [ | ||
__dirname + '/node_modules' | ||
] | ||
}, | ||
target: 'node', | ||
}; |