This project can be used as a boiler plate for building a MongoDB-Express-React-Node stack application.
https://frozen-lake-54898.herokuapp.com/
Clone the repo and check out the code
Run
$ npm install
$ cd client && npm install
Set following environment variables in a .env file in the root directory
#jwt secret
JWT_SECRET = <some string> ex: 'myJWTSecret'
#fb app credentials, needs to be created at https://developers.facebook.com/apps
CLIENT_ID = <Facebook app client ID for your app>
CLIENT_SECRET = <Facebook app client secret for your app>
#email credentials
MAIL_USER = <e-mail address, from which you will be sending the account verification emails to new users> ex:"support@yourstoreapp.com"
MAIL_PASSWORD = <e-mail password for the above account>
#cloudinary credentials, needs to be created at https://cloudinary.com/
CLOUDINARY_API_SECRET = <cloudinary API secret for your app>
CLOUDINARY_API_KEY = <cloudinary API key for your app>
CLOUDINARY_CLOUD_NAME = <cloudinary cloud name>
#Database server connection URI. If you are using mLab, this needs to be created at https://mlab.com/, and would look like the following:
MONGODB_URI = 'mongodb://<user_name>:<password>@xxxxx.mlab.com:xxxxx/<db_name>'
Run $ npm run dev
to start both front end and back end on ports 5000 and 3000 respectively
Run $ npm run start
to start the back end express server on port 5000
Method: post
Type: public
Route:
/api/auth/facebook/login
Method: post
Type: public
Route:
/api/auth/register
Method: post
Type: public
Route:
/api/auth/login
Method: get
Type: public
Route:
/api/auth/verify/<your token>
Method: get
Type: private
Route:
/api/auth/me
Method: get
Type: public
Route:
/api/users/
Method: get
Type: public
Route:
/api/users/<user ID>
Method: post
Type: private
Route:
/api/items/
Method: get
Type: public
Route:
/api/items/<item ID>
Method: get
Type: public
Route:
/api/items/
Method: delete
Type: private
Route:
/api/items/<item ID>
Method: put
Type: private
Route:
/api/items/<item ID>
Currently No tests are available.
To deploy on Heroku, create an account and set up environment variables. Then run $ git push heroku master
Preview
Please create an issue and start working a feature/ bug you prefer :rocket:.
This project is licensed under ISC.