This is backend for the application XharkTank, where entrepreneurs from all around can pitch their unique ideas and investors can offer them an investment in exchange of some equity of their company.
Pitch your one in a million idea to the panel of sharks.
Invest in the company which is going to be the next Big thing.
Live Deployed here .
Node.js - evented I/O for the backend
Express - fast node.js network app framework
MongoDB - cross-platform document-oriented database program
Install the dependencies.
cd mohitjaiswal819-ME_BUILDOUT_XHARKTANK/
npm install
Setup environments variables.
Inside the config folder , set your enviroment variables (PORT
and MongoURI
)
.
├── _CRIO_
├── metadata.json
├── assessment
├── main.py
├── requirements.txt
├── config
│ ├── config.env
│ ├── db.js
├── models
│ ├── investor.js
├── pitch.js
├── routes
│ ├── index.js
├── server.js
├── .gitignore
├── package.json
├── package-lock.json
├── README.md
├── server_run.sh
├── setup.sh
Returns JSON
of all pitches in reverse chronological order.
[
{
"id" :string ,
"entrepreneur" :string ,
"pitchTitle" :string ,
"pitchIdea" :string ,
"askAmount" :float ,
"equity" :float ,
"offers" :[
{
"id" :string ,
"investor" :string ,
"amount" :float ,
"equity" :float ,
"comment" :string
}
]
}
]
Status Code
Description
200
OK
500
INTERNAL SERVER ERROR
{
"id" :string ,
"entrepreneur" :string ,
"pitchTitle" :string ,
"pitchIdea" :string ,
"askAmount" :float ,
"equity" :float ,
"offers" :[
{
"id" :string ,
"investor" :string ,
"amount" :float ,
"equity" :float ,
"comment" :string
}
]
}
Status Code
Description
200
OK
404
NOT FOUND
500
INTERNAL SERVER ERROR
Returns id
of the saved entry.
Status Code
Description
201
CREATED
400
BAD REQUEST
500
INTERNAL SERVER ERROR
POST /pitches/< pitch_id> /makeOffer
Returns id
of the saved entry.
Status Code
Description
201
CREATED
400
BAD REQUEST
404
NOT FOUND
500
INTERNAL SERVER ERROR
heroku login -i
heroku git:remote -a < your-app-name>
git push heroku master
Set up environment variables
heroku config:set ENV_VAR=< value>