Skip to content

MigraHub's backend service, powered by Strapi and deployed on Heroku.

License

Notifications You must be signed in to change notification settings

migrahub/migrahub-backend

Repository files navigation

MigraHub

Author Languages Stars Forks Contributors

🏖️ MigraHub is a hub that connects immigrants to the base care and services they need.


📌 Table of Contents

🚀 Introduction

MigraHub is a hub that connects immigrants to the base care and services they need.

It is developed under the GNU General Public License version 3, meaning you can copy, modify and host your own MigraHub if you need to.

However, you are the owner of your data - (e.g. everything that is stored in your database), and only you can access it.

This repository holds all of the code that provides the backend of MigraHub. This includes a GraphQL API powered by Stripe, which MigraHub consumes.

👷 Setup

In order to configure your backend, you need to:

1. Install Heroku locally

Follow this guide to install heroku-cli locally.

2. Create your heroku project

In your terminal, run:

heroku create migrahub

3. Setup your heroku project

First, add the free heroku postgreSQL addon:

heroku addons:create heroku-postgresql:hobby-dev

Then, retrieve your database credentials:

heroku config

This should print something like this:

DATABASE_URL: postgres://ebitxebvixeeqd:dc59b16dedb3a1eef84d4999sb4baf@ec2-50-37-231-192.compute-2.amazonaws.com: 5432/d516fp1u21ph7b.

Where the URL is setup as:

postgres:// USERNAME : PASSWORD @ HOST : PORT : DATABASE_NAME

Now, you need to setup your environment variables. Grab the values you got from the URL above, and create the command line below by replacing them.

heroku config:set DATABASE_USERNAME=<database_username>
heroku config:set DATABASE_PASSWORD=<database_password>
heroku config:set DATABASE_HOST=<database_host>
heroku config:set DATABASE_PORT=<database_port>
heroku config:set DATABASE_NAME=<database_name>

4. Publish your heroku project

Finally, just run:

git push heroku master

And then, to access your newly deployed backend:

heroku open

You will now need to set-up your admin user by accessing /admin in your heroku project URL, and you're ready to go!

5. Maintenance, fixes & new features

Have you changed anything?

If so, don't forget to commit your changes and repeat step 4 to deploy them to Heroku.

📮 Faq

Question: What are the tecnologies used in this project?

Answer: The tecnologies used in this project are NodeJS + Strapi to handle the server & GraphQL API, and Heroku to handle deployment and hosting.

Question: Can I host MigraHub?

Answer: Yes! You can host it, use it, modify it, as you wish. It's entirely up to you and your responsibility. However, you are the only one who owns the data generated by the project, and it is also your responsibility to keep it safe.

🐛 Issues

Feel free to file a new issue with a respective title and description on the the MigraHub Backend repository.

If you already found a solution to your problem, I would love to review your pull request!

🎉 Contributing

Feel free to contribute to the project, and make it grow!

Check the issues page to see ongoing isses and pull requests.

📕 License

Released in 2020.

This project is under the MIT license.

Made with love by MigraHub team 💙🚀

About

MigraHub's backend service, powered by Strapi and deployed on Heroku.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published