/kickstarter-clone

Kickstarter clone built with Node.js / Express / MongoDB / Stripe / Elasticsearch (experimental)

Primary LanguageJavaScript

Crowdfunding Startup "Kickstarter" Clone

Basic functionality of crowdfunding platform

  • Authentication, Create/Edit projects, Get/Give funding, Commenting, Email, Share

Setup

Pre-requisite: Install Vagrant and VirtualBox

In Terminal, type following to create Vagrant file

vagrant init

Configure the Setup, use Ubuntu and private network, for example

config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.33.10"

Then, login to Vagrant, install Node.js, Git, Mongo

vagrant up
vagrant ssh
sudo apt-get update
sudo apt-get install nodejs npm nodejs-legacy git mongodb
sudo apt-get update
sudo npm install -g npm
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g nodemon forever
sudo service mongodb start
cd /vagrant
npm start

To use ES2015

sudo npm install -g babel-cli

TechStack

Deployment

Signup Heroku and install heroku toolbelt Create heroku app

heroku create

then, set config vars from settings for environmental variables like MONGOLAB_URI, CLOUD_API, etc

Some issues when deployed at Heroku -> Quick fix:

  • Move all files and folder inside /build to root
  • Then, change in the file express-config.js from (__dirname, '../views')) to (__dirname, '/views'))
  • Then push to Heroku

Elastic Search with Heroku

Local Installation Steps for Elasticsearch for development

audo apt-get update
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
sudo apt-get update
sudo apt-get install elasticsearch

sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk

sudo service elasticsearch start 
sudo service elasticsearch restart

Then start server.