The site has been deployed using Fly.io and MongoDB Atlas at https://inno.fly.dev/
nodejs 14.x
Check that you have node and npm(comes with node) successfully installed:
node -v
npm -v
mongodb 4.4
Follow the official instructions at: https://docs.mongodb.com/manual/administration/install-community/
Clone the project using git and cd into it:
git clone https://github.com/rohit-gohri/inno.git
cd inno
Run npm install - this installs all the dependencies of the project (found in package.json) :
npm install
There is a config/default.json
config file that provides default value
Add a production.json
and development.json
file in the config
directory. These files are used to store API keys and various other variable configurations like : site-url, contact-form-email, etc. Only add the things you want to overwrite in default.json
.
It needs to have the following format :
{
"mailgun": {
"auth": {
"api_key": "<your-mailgun-api-key>",
"domain": "<domain-registered-on-mailgun>"
}
},
"url": "<domain-name-on-which-this-is-setup>",
"hashids": {
"secret": "<hash-secret-for-unique-id-generation>",
"no_chars": 4,
"chars": "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
},
"contactEmail": "<email-for-contact-form>",
"dbhost": "<mongodb-host-url",
"sessionSecret": "<session-secret>",
"fb": {
"clientID": "<FB-app-id-for-login>",
"clientSecret": "<fb-app-secret>",
"callbackURL": "<site-url> + /login/fb/callback"
}
}
This is used for sending emails. Signup and get your own key here: https://www.mailgun.com/email-api/
This is used for Login with Facebook. Create your own app and get your own key here: https://developers.facebook.com/docs/development/create-an-app/
Development (localhost) - this will read overrides from config/development.json
npm run dev
Development Watch Mode (uses nodemon)
npm run dev:watch
Production - this will read overrides from config/production.json
npm run start
Production PM2
pm2 start ecosystem.config.js --env production
To get access to admin panel, you'll have to manually mark a user as is_admin: true
in the DB.
You'll need MongoDB Compass or other similar tool for it.
See Github Contributors: https://github.com/rohit-gohri/inno/graphs/contributors