How do I set my app up for production? - production

So, I guess this is less "programming" related but still relevant. I'm curious. How do companies set their apps up for production? Say I have a MERN app with an additional backend that actually supports my API. Can I push the server into production (where the actual API lives), and then push out the MERN app as well?
Node/Express server that has all of my API's functionality. (Users, Posts, etc)
MERN app that has a very minimal server (think, Express generated, kind of), but has my complete frontend.
Or do I just push the entire thing into production? The entire API, the entire frontend, and a little extra server side code to run the frontend.
Thanks in advance!

Related

Question about deploying a Shopify app to Heroku

I have question about Shopify app development and the deployment process.
I've used the getting started guide here, and I have an app that works fine when I use npm run dev and view the app in the store admin.
However, of course, once I stop the server from running, the app is no longer accessible.
I believe I need to deploy the app to Heroku (or something similar) in order to have it work in a non-development environment.
It doesn't seem like there is much guidance online from Shopify about the best way to go about this.
Does anyone know what steps I need to take in order to deploy my app to Heroku, so that I can use the app in by test store on another device?
It seems like every guide online stops JUST BEFORE explaining this process and I can't figure out why! I have tried everything online but nothing has worked:
Adding the code to Github and connecting it to Heroku
Using Docker
Any help is appreciated. Thank you!
You have zero obligations to use Heroku. If you have an IP address dedicated to your house, you could host the App using your house. If you co-locate your own server at an Internet business, and they give you IP addresses you can use that. If you wanted to use Amazon directly, you could use EC2. If you wanted to use Linode, or Azure, or any other cloud service, feel free! It is up to you!
Using Heroku (built on AWS) is traditional only in the sense that it is the original easy peasy hosting in the cloud service. Play with Heroku by reading Heroku-specific documentation or hosting information. This has nothing to do with Shopify. Shopify only mentions Heroku because traditionally, developers used it. No other reason.
If you want to learn how to use Heroku, 100% there are blog posts within easy reach for you to study and learn from.

My Heroku app is being used by another site

My Heroku-app is being used by other people, on other websites then mine.
Is there a way that only my site can use the app?
I have a small site so i use a free account, this way my free "dynos" are gone very quick.
You have some options...
If your app or api is being used by javascript web apps in the browser then setting a CORS heading specifying your top level domain should do the trick.
If your app or api is being consumed by other servers or non-browser based processes then specifying an authentication process such as http basic (user/password) should restrict access to the set of clients that you control. If your service is successful then congratulations! Maybe you should scale up and start charging?
It seems like your goal is to stay in the free tier at Heroku.
Heroku starts your dynos triggered by the request coming in on their router mesh. This means every authentication or blocking technique inside your application will still lead to the dynos being started (that includes CORS).
Heroku itself doesn't give you configuration for their routing in the free/low-price tiers. If you pay for it, there is private spaces.
One possible solution is to have another layer over your app that does the authentication.
For example this could be:
cloudflare
Amazon CloudFront (not sure, with the Web Application Firewall)
other CDN
These will likely have a free tier that's enough for you, but also be rather complex to setup for a beginner.
I hope I could help you a little

looking for Parse alternative server

I'm a hobby developer that use Parse.com as my database and website host, as Facebook is going to shutdown Parse.com, I'm now looking for alternative Parse server.
I use Parse's Cloud Code Hosting to build Dynamic Web App, and Parse itself to store data collected from the website I've build, with custom Cloud Code to help getting and managing data. I've build a Windows Phone app for myself to manage the data I've collected too.
Is there any alternative server that has my requirement?
Dynamic Website
Database host
Custom Cloud Code (with BeforeSave and AfterSave trigger)
with Windows Phone SDK (or REST API if doesn't have)
Very thank you for helping me!
Try out Hasura.
Hasura (http://www.hasura.io): Hasura is a neat PaaS + BaaS solution. It is now competing with Firebase, Kinvey, Heroku et al. There is a full comparison page here: Compare | Hasura (https://compare.beta.hasura.io) . The difference majorly lies in infra ownership as well as no tech lock-in due to open-source components(like docker, kubernetes,postgres) building the major chunk of the platform. Check it out. There is also an option to explore (https://explore.beta.hasura.io/) Hasura by building your own blog web app and a todo app in under 15 mins.
Hasura should fit in perfectly for your needs.
DISCLAIMER : Hasura Engineer here.
I'm using Simbla website application development. It doesn't support all of your requirments but it has great UI builder with a backend parse database.
You can try using the parse open source server it has cloud code and you can use a custom database with it.

Is Parse an adequate solution here?

I'm contemplating to use Parse as a platform for my app, as I'm trying to avoid creating and managing the cloud infrastructure myself.
For the sake of simplicity let's say that my app will hook into an Exchange Server and will need to leverage some hosted Machine Learning service to categorize my e-mail and report on insights found.
I'm assuming that Parse would store my core data, while the hosted ML will store the "Big Data" associated with processing for insights.
I'm also expecting my app to receive push notifications generated by the hosted ML service.
Does this sound like a plausible way to go about it and leverage Parse, or am I better off developing the backend myself?
I think parse.com is the right place for you requirements, because they have everything you need like storage of core data, push notifications, cloud module which can be integrated with heroku, social integration, user management functionalities.
They also have large set of client libraries for desktop and mobile apps (node,java,.net etc...) also they have libraries of embedded devices.
The biggest advantage is that everything is setup, and you are focused on software development not on infrastructure things. This is my opinion.
I've been experimenting with the above stack and so far was really impressed. Seems like a viable path forward. The Cloud Code capability of Parse is very solid, and easy to work with. If you want to run services outside of Parse code this us also possible : just issue REST calls.

How to move Parse.com database to my own server and still use Parse.com SDK?

I'm using Parse.com SDK services for my Android app.
I've seen that Parse had released their Android SDK as an open source project on Github on this address.
My app is almost finished, and when I'm uploading it to the Play Store, I don't want to be controlled by Parse.com (I mean that I don't want to be blocked someday, or I don't know that), so I want to move my whole database to my own server that hosted on a secure company.
I've checked the open source project on Github and realized that all I need to use it on my own server is to generate an Application ID and a client key.
So I want to ask if someone knows how to generate an Application ID and a client key of Parse to use it on my own server, or that you maybe knows another way of moving it to my server? And one more question: Today I'm using also Facebook SDK with my app. If I will move my database to my own server, will I still be able to use Facebook SDK on my app?
Thanks!
I have write an article about how to migrate parse to a custom server.
https://medium.com/#jcminarro/run-parse-server-on-your-own-server-using-digitalocean-b2a7d66e1205
There's a massive difference between Parse open-sourcing their SDKs compared to revealing their entire backend architecture and its configuration.
The open-sourced SDKs are essentially wrappers for Parse's REST API along with some convenience functions and logic for natively interpreting the JSON data Parse is transmitting.
At a high level, Parse uses MongoDB for its core database and is entirely hosted using AWS (Amazon Web Services). The entire architecture is highly complex and is not something you could just drag and drop onto your own software stack or hardware backend.
To help give you a better idea of how Parse achieves all of their services, here's an interesting presentation their Dev Ops team gave at an AWS convention. Suffice it to say, hosting the backend services for over 180,000 apps requires a complex infrastructure and that is the "secret sauce" so to speak for Parse and is why Facebook purchased them for over $85 million two years ago.

Resources