Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I_Helmet
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
0
Merge Requests
0
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
21_22-J 62
I_Helmet
Commits
5ce68d98
Commit
5ce68d98
authored
Apr 27, 2022
by
Balasuriya D.A.M.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove End point and Add new end point with User Routes
parent
e3eaf05a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
11 deletions
+10
-11
IT18021080/Telemedicine-Chat-App/backend/controllers/userControllers.js
...emedicine-Chat-App/backend/controllers/userControllers.js
+0
-0
IT18021080/Telemedicine-Chat-App/backend/routes/userRoutes.js
...021080/Telemedicine-Chat-App/backend/routes/userRoutes.js
+8
-0
IT18021080/Telemedicine-Chat-App/backend/server.js
IT18021080/Telemedicine-Chat-App/backend/server.js
+2
-11
No files found.
IT18021080/Telemedicine-Chat-App/backend/controllers/userControllers.js
0 → 100644
View file @
5ce68d98
IT18021080/Telemedicine-Chat-App/backend/routes/userRoutes.js
0 → 100644
View file @
5ce68d98
const
express
=
require
(
"
express
"
);
const
router
=
express
.
Router
();
//router.route("/").post(registerUser)
//router.post("/login",authUser)
module
.
exports
=
router
;
IT18021080/Telemedicine-Chat-App/backend/server.js
View file @
5ce68d98
...
...
@@ -4,6 +4,7 @@ const dotenv = require("dotenv");
const
{
chats
}
=
require
(
"
./data/data
"
);
const
connectDB
=
require
(
"
./config/db
"
);
const
colors
=
require
(
"
colors
"
);
const
userRoutes
=
require
(
"
./routes/userRoutes
"
);
dotenv
.
config
();
...
...
@@ -18,17 +19,7 @@ app.get("/", (req, res) => {
res
.
send
(
"
API is Running Successfully
"
);
});
app
.
get
(
"
/api/chat
"
,
(
req
,
res
)
=>
{
res
.
send
(
chats
);
});
app
.
get
(
"
/api/chat/:id
"
,
(
req
,
res
)
=>
{
// console.log(req.params.id);
const
singleChat
=
chats
.
find
((
c
)
=>
c
.
_id
===
req
.
params
.
id
);
res
.
send
(
singleChat
);
});
app
.
use
(
"
/api/user
"
,
userRoutes
);
const
PORT
=
process
.
env
.
PORT
||
5000
;
...
...
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