Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-074
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2022-074
2022-074
Commits
13b0c1ac
Commit
13b0c1ac
authored
Mar 12, 2022
by
Wasala W.L.M.K.S - IT19177106
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial commit on backend
parent
85cce12d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
0 deletions
+51
-0
backend/app.js
backend/app.js
+27
-0
backend/package.json
backend/package.json
+24
-0
No files found.
backend/app.js
0 → 100644
View file @
13b0c1ac
const
express
=
require
(
"
express
"
);
const
app
=
express
();
const
bodyParser
=
require
(
"
body-parser
"
);
const
cors
=
require
(
'
cors
'
);
require
(
"
./src/db/conn
"
);
require
(
"
./src/models/User.model
"
);
require
(
"
./src/models/Results.model
"
);
const
port
=
process
.
env
.
PORT
||
3000
;
app
.
use
(
cors
());
app
.
use
(
bodyParser
.
json
({
limit
:
'
50mb
'
}));
app
.
use
(
bodyParser
.
urlencoded
({
limit
:
'
50mb
'
,
extended
:
true
,
parameterLimit
:
1000000
}));
app
.
use
(
express
.
static
(
__dirname
+
'
/src/uploads
'
));
const
routes
=
require
(
"
./src/api/Registration.api
"
);
app
.
use
(
'
/
'
,
routes
)
app
.
listen
(
port
,
()
=>
{
console
.
log
(
`server is running at port no
${
port
}
`
);
})
\ No newline at end of file
backend/package.json
0 → 100644
View file @
13b0c1ac
{
"name"
:
"backend"
,
"version"
:
"1.0.0"
,
"description"
:
"af group project back end "
,
"main"
:
"index.js"
,
"scripts"
:
{
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
,
"start"
:
"nodemon app.js"
},
"author"
:
"Sandunika Wasala"
,
"license"
:
"ISC"
,
"dependencies"
:
{
"body-parser"
:
"^1.19.0"
,
"config"
:
"^3.3.6"
,
"cors"
:
"^2.8.5"
,
"csv-writer"
:
"^1.6.0"
,
"dotenv"
:
"^10.0.0"
,
"express"
:
"^4.17.1"
,
"json2csv"
:
"^5.0.7"
,
"mongoose"
:
"^5.12.14"
,
"multer"
:
"^1.4.2"
,
"nodemon"
:
"^2.0.15"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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