
Member-only story
Deploying Realtime FeathersJS to DigitalOcean App Platform
Recently, the DigitalOcean App Hackathon was announced. If you’ve been following my articles on FeathersJS, this is a great opportunity to try out Feathers.
In this brief article, I’ll show how to launch your own Feathers instance on Digital Ocean.
Similar to Heroku and other PaaS (Platform-as-a-Service) providers, with the DigitalOcean App service, it’s quite easy and straightforward to deploy an application. Digital Ocean provides a full workflow to add in environment variables, add a managed database, build on code push, and to deploy your application. If you don’t want to deal with the stress of CI/CD (continuous integration/continuous delivery) and DevOps for an application, this may be a good option.
Generate Application
To get started, I generated a basic Feathers application using the following settings:
feathers generate app
? Do you want to use JavaScript or TypeScript? ...JavaScript
? Project name ...do-feathers
? Description ...Digital Ocean Feathers App
? What folder should the source files live in? ...src
? Which package manager are you using (has to be installed globally)? ...Yarn
? What type of API are you making? ...Realtime via Socket.io
? Which testing framework do you prefer? ...Jest
? This app uses authentication ...Yes
? Which coding style do you want to use? ...ESLint
? What authentication strategies do you want to use? (See API docs for all 180+ supported oAuth providers) ...Username + Password (Local)
? What is the name of the user (entity) service? ...users
? What kind of service is it? ...NeDB
? What is the database connection string? (nedb://../data)
This scaffolded a barebones application.
I updated the index.html
in /public/index.html
.
Then I pushed this to my github repo.
Digital Ocean App Platform
To create a new App, on the home screen, click the Create App button.
