Skip to main content
added full stack js "best practices"
Source Link
MaxWell
  • 353
  • 2
  • 9

Yes, you should separate the two and treat the front end app like a 3rd party app--you may eventually add another client, a mobile app for example, and if the first client has been built this way your life will be easier.

Using docker containers or another deployment system mostly pertains to the backend, as the front end of your app are just static assets that need to be resolved. You can either host those assets statically in your server or somewhere else like a CDN like cloudfront.

Avoiding cors will save you a Little configuration, but as the above answer mentioned, that's sortof the point. Using cors (and token auth) will better prepare your backend for other clients as well.

Edit: as far as full stack js best practices--I would just say this, be consistent. If you're using promises (and you should), do it on both sides. Keep the same js style and formatting, use the same testing libs (where possible), etc.

Yes, you should separate the two and treat the front end app like a 3rd party app--you may eventually add another client, a mobile app for example, and if the first client has been built this way your life will be easier.

Using docker containers or another deployment system mostly pertains to the backend, as the front end of your app are just static assets that need to be resolved. You can either host those assets statically in your server or somewhere else like a CDN like cloudfront.

Avoiding cors will save you a Little configuration, but as the above answer mentioned, that's sortof the point. Using cors (and token auth) will better prepare your backend for other clients as well.

Yes, you should separate the two and treat the front end app like a 3rd party app--you may eventually add another client, a mobile app for example, and if the first client has been built this way your life will be easier.

Using docker containers or another deployment system mostly pertains to the backend, as the front end of your app are just static assets that need to be resolved. You can either host those assets statically in your server or somewhere else like a CDN like cloudfront.

Avoiding cors will save you a Little configuration, but as the above answer mentioned, that's sortof the point. Using cors (and token auth) will better prepare your backend for other clients as well.

Edit: as far as full stack js best practices--I would just say this, be consistent. If you're using promises (and you should), do it on both sides. Keep the same js style and formatting, use the same testing libs (where possible), etc.

Source Link
MaxWell
  • 353
  • 2
  • 9

Yes, you should separate the two and treat the front end app like a 3rd party app--you may eventually add another client, a mobile app for example, and if the first client has been built this way your life will be easier.

Using docker containers or another deployment system mostly pertains to the backend, as the front end of your app are just static assets that need to be resolved. You can either host those assets statically in your server or somewhere else like a CDN like cloudfront.

Avoiding cors will save you a Little configuration, but as the above answer mentioned, that's sortof the point. Using cors (and token auth) will better prepare your backend for other clients as well.