Skip to content

koyeb/example-node-schedule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Koyeb Serverless Platform

Deploy a node-schedule application on Koyeb
Learn more about Koyeb · Explore the documentation · Discover our tutorials

About Koyeb and the node-schedule example application

Koyeb is a developer-friendly serverless platform to deploy apps globally. No-ops, servers, or infrastructure management.

This repository contains is designed to show how a node-schedule application can be deployed to Koyeb. The demo application aggregates the top ten most-commented on Hacker news posts and sends them to a designated email address using a cron-like schedule.

You can follow the associated tutorial to learn more about the application and how it works.

Getting Started

Follow the steps below to deploy and run the Nuxt application on your Koyeb account.

Requirements

You need a Koyeb account to successfully deploy and run this application. If you don't already have an account, you can sign-up for free.

You also need a Mailgun account to send the email with the aggregated links. From your Mailgun account, you need to configure an authorized recipient email address and then retrieve the following details associated with your account:

  • API_KEY: The Mailgun private API key associated for your account.
  • DOMAIN: The sandbox domain for your account.
  • EMAIL: The postmaster@ email address associated with your Mailgun domain.
  • RECIPIENT_EMAIL: The authorized email address that you configured to receive email.

Deploy using the Koyeb button

The fastest way to deploy the Nuxt application is to click the Deploy to Koyeb button below.

Deploy to Koyeb

Clicking on this button brings you to the Koyeb App creation page with most of the settings pre-configured to launch this application. You will need to replace the values for the following variables:

Environment variable Required? Description
API_KEY yes Mailgun account private API key
DOMAIN yes Mailgun account sandbox domain
EMAIL yes Mailgun domain's postmaster@ email address
RECIPIENT_EMAIL yes The Mailgun authorized recipient email address
SCHEDULE no An optional node-schedule cron schedule (default: every 2 minutes)

To modify this application example, you will need to fork this repository. Checkout the fork and deploy instructions.

Fork and deploy to Koyeb

If you want to customize and enhance this application, you need to fork this repository.

If you used the Deploy to Koyeb button, you can simply link your service to your forked repository to be able to push changes. Alternatively, you can manually create the application as described below.

On the Koyeb Control Panel, on the Overview tab, click the Create Web Service button to begin.

  1. Select GitHub as the deployment method.
  2. Choose the repository containing your application code.
  3. In the Environment variables section, click the Add variable button to fill in the environment variables outlined above.
  4. Choose a name for your App and Service, for example example-node-schedule, and click Deploy.

Your node-schedule application will be deployed to Koyeb. You can follow the build process as the repository is cloned, built, and deployed. Once the deployment is complete, it will aggregate Hacker News post data and send it to the configured email address according to the schedule provided.

Contributing

If you have any questions, ideas or suggestions regarding this application sample, feel free to open an issue or fork this repository and open a pull request.

Contact

Koyeb - @gokoyeb - Slack

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published