MoonFlow is a web app built on the MERN stack that provides users with astrological guidance based on their star sign and house, as well as the current moon phase
The Documentation for the API that runs on the express server can be found in DOCUMENTATION.md
Apps deployed to heroku are restarted once a day to ensure the app stays responsive and in a healthy state (see here for more info). When the server restarts, the cron jobs that were started to send out the emails are lost, and on any day except sunday, the emails will not be sent. We suggest moving the email scheduling code to the npm package agenda, as it maintains its task list in the database, and will ensure that the jobs still run, even if the server is restarted.
To set up your system for development please do the following steps:
- Install Node
- Note: Ensure you install the additional build tools, one of the later steps in the install process. If you've already installed Node, you can mondify your installation through the Windows Settings Apps and Features "Modify" button
- Clone the repository
git clone [email protected]:6XAM/MVP.git MVP
orhttps://github.com/6XAM/MVP.git MVP
cd
into the projectcd MVP
- Install npm packages
npm install
- Note: you only need to run this on initial setup to get
concurrently
, which is needed for theinstall-all
script
- Install all npm packages (including client)
- Copy
config.js
toserver/config/config.js
- Run the desired development script
npm run-script dev
for express server and react servernpm run-script client
for react servernpm run-script server
for express server
To deploy to Heroku please do the following steps:
- Install Heroku CLI
- Login to Heroku
heroku login
and follow the prompts
- From the root of your project, add the Heroku git remote
heroku git:remote a mvp-heaven
- Push your code to the Heroku remote
git push heroku master
to push local master to Heroku mastergit push heroku development:master
to push local development to Heroku master
- When it is done deploying, it can be viewed at https://mvp-heaven.herokuapp.com. If issues occur, you can use
heroku log --tail
to see the console output.
Please note that any time the server is run in these scripts nodemon
is used in place of node
for easier development. In the project directory, you can run:
Runs both the client app and the server app in development mode.
Open http://localhost:3000 to view the client in the browser.
Runs just the client app in development mode.
Open http://localhost:3000 to view the client in the browser.
Runs just the server in development mode.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
If deploying to heroku this does not need to be run since it is handled by the heroku-postbuild script