This tutorial will guide you through the process of deploying multiple MERN apps to a single digital ocean ubuntu VPS droplet Reference
| // Source: https://twitter.com/calebporzio/status/1151876736931549185 | |
| <div class="flex"> | |
| <aside class="h-screen sticky top-0"> | |
| // Fixed Sidebar | |
| </aside> | |
| <main> | |
| // Content | |
| </main> |
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
-
When writing a string of multiple utility classes, always do so in an order with meaning. The "Concentric CSS" approach works well with utility classes (i.e,. 1. positioning/visibility 2. box model 3. borders 4. backgrounds 5. typography 6. other visual adjustments). Once you establish a familiar pattern of ordering, parsing through long strings of utility classes will become much, much faster so a little more effort up front goes a long way!
-
Always use fewer utility classes when possible. For example, use
mx-2instead ofml-2 mr-2and don't be afraid to use the simplerp-4 lg:pt-8instead of the longer, more complicatedpt-4 lg:pt-8 pr-4 pb-4 pl-4. -
Prefix all utility classes that will only apply at a certain breakpoint with that breakpoint's prefix. For example, use
block lg:flex lg:flex-col lg:justify-centerinstead ofblock lg:flex flex-col justify-centerto make it very clear that the flexbox utilities are only applicable at the
| const Ftp = require( 'ftp' ); | |
| const ftpClient = new Ftp(); | |
| ftpClient.on( 'ready', function() { | |
| ftpClient.put( './prueba.jpg', '/www/img/prueba.jpg', function( err, list ) { | |
| if ( err ) throw err; | |
| ftpClient.end(); | |
| } ); | |
| } ); |