Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
Project Page
Commits
a8127cf0
Commit
a8127cf0
authored
3 years ago
by
Rosanny Sihombing
Browse files
Options
Download
Email Patches
Plain Diff
re-structure the project
parent
8cd8a29a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
app.js
+2
-2
app.js
config/config.js
+4
-2
config/config.js
config/dbconn.js
+1
-1
config/dbconn.js
config/mailer.js
+1
-1
config/mailer.js
functions/gitlab.js
+0
-0
functions/gitlab.js
functions/helpers.js
+0
-0
functions/helpers.js
functions/methods.js
+1
-1
functions/methods.js
routes/project.js
+3
-3
routes/project.js
with
12 additions
and
10 deletions
+12
-10
app.js
+
2
-
2
View file @
a8127cf0
...
@@ -30,7 +30,7 @@ app.use(session(
...
@@ -30,7 +30,7 @@ app.use(session(
{
{
resave
:
true
,
resave
:
true
,
saveUninitialized
:
true
,
saveUninitialized
:
true
,
secret
:
'
thisisasecret-thisisasecret-thisisas
ecret
'
secret
:
config
.
app
.
sessionS
ecret
}
}
))
))
app
.
use
(
passport
.
initialize
())
app
.
use
(
passport
.
initialize
())
...
@@ -55,7 +55,7 @@ app.use(function(req, res, next) {
...
@@ -55,7 +55,7 @@ app.use(function(req, res, next) {
next
()
next
()
})
})
require
(
'
./routes/
routes-
project
'
)(
app
,
config
,
passport
)
require
(
'
./routes/project
'
)(
app
,
config
,
passport
)
// Handle 404
// Handle 404
app
.
use
(
function
(
req
,
res
,
next
)
{
app
.
use
(
function
(
req
,
res
,
next
)
{
...
...
This diff is collapsed.
Click to expand it.
config/config.js
+
4
-
2
View file @
a8127cf0
...
@@ -2,7 +2,8 @@ module.exports = {
...
@@ -2,7 +2,8 @@ module.exports = {
development
:
{
development
:
{
app
:
{
app
:
{
name
:
'
Project Page Manager
'
,
name
:
'
Project Page Manager
'
,
port
:
process
.
env
.
PORT
||
8888
port
:
process
.
env
.
PORT
||
8888
,
sessionSecret
:
'
thisisasecret-thisisasecret-thisisasecret
'
},
},
passport
:
{
passport
:
{
strategy
:
'
saml
'
,
strategy
:
'
saml
'
,
...
@@ -37,7 +38,8 @@ module.exports = {
...
@@ -37,7 +38,8 @@ module.exports = {
testing
:
{
testing
:
{
app
:
{
app
:
{
name
:
'
Project Page Manager
'
,
name
:
'
Project Page Manager
'
,
port
:
process
.
env
.
PORT
||
8888
port
:
process
.
env
.
PORT
||
8888
,
sessionSecret
:
'
thisisasecret-thisisasecret-thisisasecret
'
},
},
passport
:
{
passport
:
{
strategy
:
'
saml
'
,
strategy
:
'
saml
'
,
...
...
This diff is collapsed.
Click to expand it.
routes
/dbconn.js
→
config
/dbconn.js
+
1
-
1
View file @
a8127cf0
const
mysql
=
require
(
'
mysql
'
)
const
mysql
=
require
(
'
mysql
'
)
var
env
=
process
.
env
.
NODE_ENV
||
'
testing
'
;
var
env
=
process
.
env
.
NODE_ENV
||
'
testing
'
;
const
config
=
require
(
'
.
./config
/config
'
)[
env
]
const
config
=
require
(
'
./config
'
)[
env
]
// ==== USER ACOOUNT DB CONNECTION ====
// ==== USER ACOOUNT DB CONNECTION ====
var
userConnection
=
mysql
.
createConnection
({
var
userConnection
=
mysql
.
createConnection
({
...
...
This diff is collapsed.
Click to expand it.
routes
/mailer.js
→
config
/mailer.js
+
1
-
1
View file @
a8127cf0
const
nodemailer
=
require
(
'
nodemailer
'
)
const
nodemailer
=
require
(
'
nodemailer
'
)
var
env
=
process
.
env
.
NODE_ENV
||
'
testing
'
;
var
env
=
process
.
env
.
NODE_ENV
||
'
testing
'
;
const
config
=
require
(
'
.
./config
/config
'
)[
env
]
const
config
=
require
(
'
./config
'
)[
env
]
var
smtpTransport
=
nodemailer
.
createTransport
({
var
smtpTransport
=
nodemailer
.
createTransport
({
host
:
config
.
mailer
.
host
,
host
:
config
.
mailer
.
host
,
...
...
This diff is collapsed.
Click to expand it.
route
s/gitlab.js
→
function
s/gitlab.js
+
0
-
0
View file @
a8127cf0
File moved
This diff is collapsed.
Click to expand it.
route
s/helpers.js
→
function
s/helpers.js
+
0
-
0
View file @
a8127cf0
File moved
This diff is collapsed.
Click to expand it.
route
s/methods.js
→
function
s/methods.js
+
1
-
1
View file @
a8127cf0
const
dbconn
=
require
(
'
./dbconn
'
);
const
dbconn
=
require
(
'
.
./config
/dbconn
'
);
var
methods
=
{
var
methods
=
{
// test method
// test method
...
...
This diff is collapsed.
Click to expand it.
routes/
routes-
project.js
→
routes/project.js
+
3
-
3
View file @
a8127cf0
//const SamlStrategy = require('passport-saml').Strategy
//const SamlStrategy = require('passport-saml').Strategy
const
methods
=
require
(
'
./methods
'
)
const
methods
=
require
(
'
.
./functions
/methods
'
)
const
gitlab
=
require
(
'
./gitlab
'
)
const
gitlab
=
require
(
'
.
./functions
/gitlab
'
)
// pwd encryption
// pwd encryption
//const bcrypt = require('bcryptjs');
//const bcrypt = require('bcryptjs');
//const saltRounds = 10;
//const saltRounds = 10;
...
@@ -9,7 +9,7 @@ const gitlab = require('./gitlab')
...
@@ -9,7 +9,7 @@ const gitlab = require('./gitlab')
const
async
=
require
(
'
async
'
)
const
async
=
require
(
'
async
'
)
//const crypto = require('crypto')
//const crypto = require('crypto')
//const mailer = require('./mailer')
//const mailer = require('./mailer')
const
helpers
=
require
(
'
./helpers
'
)
const
helpers
=
require
(
'
.
./functions
/helpers
'
)
const
pictSizeLimit
=
1000000
// 1 MB
const
pictSizeLimit
=
1000000
// 1 MB
module
.
exports
=
function
(
app
)
{
module
.
exports
=
function
(
app
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment