A straight forward starter kit for latest versions of react and redux with custom library
sudo npm install
create an envVariables.js file in the root directory (example below)
'use strict';
module.exports = {
'version': '1.0.0',
// Environment Specifics
'name': 'development',
'baseApiRoute': 'http://localhost:3030/api/',
'baseUrl': 'http://localhost',
'clientPort': 3000,
'apiPort': 3030,
'chatPort': 3031,
'cors': {
'origin': ['*']
},
'swagger': {
'documentationPage': true
},
'googleAnalyticsKey': 'YOUR_GA_KEY',
'uploadPath': '/dist/uploads/',
'serverUID': YOUR_SERVER_UID,
'serverGID': YOUR_SERVER_GID,
'secret': 'SECRETS_SECRETS_ARE_NO_FUN',
'dbConfig': {
'development': {
'username': 'YOUR_DB_USERNAME',
'password': 'YOUR_DB_PASSWORD',
'database': 'YOUR_DB_DATABASE',
'host': '127.0.0.1',
'dialect': 'postgres',
'omitNull': true,
'options': {
'quoteIdentifiers': true
}
},
'production': {
'username': 'YOUR_DB_USERNAME',
'password': 'YOUR_DB_PASSWORD',
'database': 'YOUR_DB_DATABASE',
'host': '127.0.0.1',
'dialect': 'postgres',
'omitNull': true,
'options': {
'quoteIdentifiers': true
}
}
},
'email': {
'user': '[email protected]',
'pass': '',
'XOAuth2': {
'user': '[email protected]',
'clientId': 'YOUR_GOOGLE_CLIENT_ID',
'clientSecret': 'YOUR_GOOGLE_CLIENT_SECRET',
'refreshToken': 'YOUR_GOOGLE_REFRESH_TOKEN'
}
}
}
- Optionally create a google analytics account and add key to /envVariables.js ... uncomment respective code in /src/components/Layout.jsx
- To find you serverUID and serverGID, type
id YOUR_USERNAMEinto the server/localhost command prompt - Create a 'secret' key with a random key generator (https://randomkeygen.com/)
- Install postgres on your OS, create a database and add username, password, database, host to /envVariables.js
- To utilize gmail autoresponse, configure nodemailer and add the respective config to /envVariables.js (https://nodemailer.com/usage/using-gmail/)
-
npm installORyarn install -
npm install pm2 -gORyarn global add pm2 -
npm run build-prod -
npm run start-server -
npm run start-client
navigate to localhost:3000 or the clientPort defined in envVariables.js