Skip to content

Commit

Permalink
Merge pull request #10 from Norseolee/updates/v2.5
Browse files Browse the repository at this point in the history
Updates/v2.5
  • Loading branch information
Norseolee authored Jun 8, 2024
2 parents cc3c638 + f059e63 commit efd3ec1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const meralcoRoutes = require("./config/Routes/meralcoRoutes");
const tenantRoutes = require("./config/Routes/tenantRoutes");
const migrationRoutes = require("./config/Routes/migrationRoutes");

const port = process.env.PORT || 5432;
const port = process.env.PORT || 3000;
const app = express();

app.use(express.static("public"));
Expand Down
3 changes: 2 additions & 1 deletion config/Routes/mainRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ router.get('/dashboard', async (req, res) => {
mainUserData = await User.query().findById(user.id);
} else {
// Redirect to login if user cannot be authenticated
req.flash('message', { text: 'wrong password', type: 'danger' });
return res.redirect('/');
}
} else {
Expand Down Expand Up @@ -116,7 +117,7 @@ router.post('/login', async (req, res) => {

if (user) {
const passwordMatch = await bcrypt.compare(password, user.password);

console.log(`Password match: ${passwordMatch}`);
if (passwordMatch) {
req.session.user = user;
if (remember_me) {
Expand Down
30 changes: 15 additions & 15 deletions knexfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ module.exports = {
development: {
client: 'mysql',
connection: {
host: 'localhost',
user: 'root',
password: '',
database: 'am9commercial',
connectionLimit: 5,
host: 'b18rvltkeprxyrwdxj35-mysql.services.clever-cloud.com',
user: 'u1llarmjzoo3t683',
password: 'HKDuDLkfJO1cZQJX58M7',
database: 'b18rvltkeprxyrwdxj35',
connectionLimit: 20,
},
pool: {
min: 2,
Expand All @@ -24,11 +24,11 @@ module.exports = {
staging: {
client: 'mysql',
connection: {
host: 'dpg-cpi0prsf7o1s73ba9bi0-a',
user: 'root',
password: 'OBOW3zix2UcYdqt1U79cofZTBvuXHPoI',
database: 'am9commercial',
connectionLimit: 5,
host: 'b18rvltkeprxyrwdxj35-mysql.services.clever-cloud.com',
user: 'u1llarmjzoo3t683',
password: 'HKDuDLkfJO1cZQJX58M7',
database: 'b18rvltkeprxyrwdxj35',
connectionLimit: 20,
},
pool: {
min: 2,
Expand All @@ -42,11 +42,11 @@ module.exports = {
production: {
client: 'mysql',
connection: {
host: 'dpg-cpi0prsf7o1s73ba9bi0-a',
user: 'root',
password: 'OBOW3zix2UcYdqt1U79cofZTBvuXHPoI',
database: 'am9commercial',
connectionLimit: 5,
host: 'b18rvltkeprxyrwdxj35-mysql.services.clever-cloud.com',
user: 'u1llarmjzoo3t683',
password: 'HKDuDLkfJO1cZQJX58M7',
database: 'b18rvltkeprxyrwdxj35',
connectionLimit: 20,
},
pool: {
min: 2,
Expand Down

0 comments on commit efd3ec1

Please sign in to comment.