- install node.js https://nodejs.org and click the Install button
- install mongoDB http://mongodb.org and click Download MongoDB.
- install Nodemon
npm install nodemon -g
- clone the project
git clone https://github.com/aelittaezugbaya/Jobber.git
- go to the project folder
- run
npm install
ornpm i
How to use:
npm run [script name]
We have several npm scripts:
- start: launches front-end in development mode, it will watch for changes in folder
frontend
and refresh the page - backend-dev: launches back-end in development mode, it will watch for changes in backend code and relaunch server
- backend: launches back-end
- build: builds front-end and outputs results to folder
public
Note: Folder public
is not included in repository, you have to run npm run build
to get it.
If you run npm start
then front-end will run on http://localhost:8080
If you run npm run backend
or npm run backend-dev
then back-end will run on http://localhost:3000
. Built front-end from folder public
also is hosted on this port.
###Proxy
If you run npm start
and npm run backend
/npm run backend-dev
then requests to http://localhost:8080/api
will redirected to http://localhost:3000/api
.
POST /api/auth/login
- Password
POST /api/auth/register
- FullName
- DateOfBirth
- Gender
- Password
- Lat
- Lon
GET /api/feedback/:ReceiverId
- UserSourceID
- UserReceiverID
- Comment
- Rating
POST /api/feedback
- UserSourceID
- UserReceiverID
- Comment
- Rating
GET /api/service/:id
- UserOwnerID
- IsRequest
- Subject
- Category
- Location
- type
- type
- coordinates
- Lon
- Lat
- type
- Gender
- Description
- Price
- Status
- DateCreated
GET /api/service/:lat/:lon/:radius
- all service objects within the radius
POST /api/service
- UserOwnerID
- IsRequest
- Subject
- Category
- Lon
- Lat
- Gender
- Description
- Price
PUT /api/service/:id
- UserOwnerID
- IsRequest
- Subject
- Category
- Lon
- Lat
- Gender
- Description
- Price
GET /api/user/:id
- Rating
- FullName
- Description (User description defaults to 'Hello, I am .' upon registration)
- Hash
- Salt
- DateOfBirth
- Gender
- Status
PUT /api/user/:id
- FullName
- DateOfBirth
- Gender
- Description