From 5c66af4831695c8c263e4b539023edb8a2c5fcf8 Mon Sep 17 00:00:00 2001 From: Faraz Patankar Date: Thu, 13 May 2021 10:56:21 +0400 Subject: [PATCH] Add frontmatter to all starters (#98) * add frontmatter to BlitzJS starter * add frontmatter to all starters * add plugins and envVars * fix envVars formatting * fix key for defaultValue in envVars * remove unused frontmatter --- examples/blitzjs/README.md | 10 ++++++++++ examples/deno/README.md | 8 ++++++++ examples/discordjs/README.md | 8 ++++++++ examples/djangopy/README.md | 9 +++++++++ examples/elixir-phoenix/README.md | 9 +++++++++ examples/expressjs-mongoose/README.md | 10 ++++++++++ examples/expressjs-postgres/README.md | 9 +++++++++ examples/expressjs-prisma/README.md | 10 ++++++++++ examples/expressjs/README.md | 8 ++++++++ examples/fastapi/README.md | 12 ++++++++---- examples/flask/README.md | 10 ++++++++-- examples/hapi/README.md | 8 ++++++++ examples/hasura/README.md | 8 ++++++++ examples/http-nodejs/README.md | 8 ++++++++ examples/laravel/README.md | 9 +++++++++ examples/next-notion-blog/README.md | 10 ++++++++++ examples/nextjs-auth-mongo/README.md | 10 ++++++++++ examples/nextjs-prisma/README.md | 10 ++++++++++ examples/nuxtjs/README.md | 8 ++++++++ examples/rails-blog/README.md | 9 +++++++++ examples/rails-starter/README.md | 9 +++++++++ examples/rocket/README.md | 8 ++++++++ examples/sinatra/README.md | 8 ++++++++ examples/slack-webhook/README.md | 8 ++++++++ examples/starlette/README.md | 11 ++++++++++- examples/svelte-kit/README.md | 8 ++++++++ examples/telegram-bot/README.md | 9 +++++++++ examples/umami/README.md | 11 +++++++++++ 28 files changed, 248 insertions(+), 7 deletions(-) diff --git a/examples/blitzjs/README.md b/examples/blitzjs/README.md index 4ed3fb8..b9d43d9 100644 --- a/examples/blitzjs/README.md +++ b/examples/blitzjs/README.md @@ -1,3 +1,13 @@ +--- +title: BlitzJS +description: Example Blitz app that connects to a PostgreSQL database +tags: + - blitz + - postgresql + - typescript + - prisma +--- + # Blitz.js Postgres Example This example is a [Blitz.js](https://blitzjs.com/) app that connects to a diff --git a/examples/deno/README.md b/examples/deno/README.md index 6e29259..e9b632d 100644 --- a/examples/deno/README.md +++ b/examples/deno/README.md @@ -1,3 +1,11 @@ +--- +title: Deno +description: A small Deno webserver +tags: + - deno + - typescript +--- + # Deno Example This example is a small [Deno](https://deno.land/) webserver. diff --git a/examples/discordjs/README.md b/examples/discordjs/README.md index 4288a63..0b06e22 100644 --- a/examples/discordjs/README.md +++ b/examples/discordjs/README.md @@ -1,3 +1,11 @@ +--- +title: Discord bot +description: A Discord bot written in TypeScript +tags: + - discord.js + - typescript +--- + # Discord.js Example This example starts a Discord bot using [discord.js](https://discord.js.org/#/). diff --git a/examples/djangopy/README.md b/examples/djangopy/README.md index 6c84d3e..99f231e 100644 --- a/examples/djangopy/README.md +++ b/examples/djangopy/README.md @@ -1,3 +1,12 @@ +--- +title: Django +description: A Django application that connects to a PostgreSQL database +tags: + - python + - django + - postgres +--- + # Django Example This is a [Django](https://www.djangoproject.com/) application that connects to a Railway Postgres database. diff --git a/examples/elixir-phoenix/README.md b/examples/elixir-phoenix/README.md index d7966dd..4422d81 100644 --- a/examples/elixir-phoenix/README.md +++ b/examples/elixir-phoenix/README.md @@ -1,3 +1,12 @@ +--- +title: Elixir Phoenix +description: A Phoenix application that connects to a PostgreSQL database +tags: + - elixir + - phoenix + - postgres +--- + # Elixir Phoenix Example This example is a [Phoenix](https://www.phoenixframework.org/) application that diff --git a/examples/expressjs-mongoose/README.md b/examples/expressjs-mongoose/README.md index 78d6d40..12d4222 100644 --- a/examples/expressjs-mongoose/README.md +++ b/examples/expressjs-mongoose/README.md @@ -1,3 +1,13 @@ +--- +title: ExpressJS Mongoose +description: An ExpressJS server that connects to a MongoDB database +tags: + - express + - mongodb + - mongoose + - typescript +--- + # ExpressJS Mongoose Example This example starts an [ExpressJS](https://expressjs.com/) server that connects to a Railway MongoDB database using [MongooseJS](https://mongoosejs.com/) diff --git a/examples/expressjs-postgres/README.md b/examples/expressjs-postgres/README.md index 7da27c5..0e87374 100644 --- a/examples/expressjs-postgres/README.md +++ b/examples/expressjs-postgres/README.md @@ -1,3 +1,12 @@ +--- +title: ExpressJS Postgres +description: An ExpressJS server that connects to a PostgreSQL database +tags: + - express + - postgres + - typescript +--- + # ExpressJS Postgres Example This example starts an [ExpressJS](https://expressjs.com/) server that connects diff --git a/examples/expressjs-prisma/README.md b/examples/expressjs-prisma/README.md index df7bafd..2128de1 100644 --- a/examples/expressjs-prisma/README.md +++ b/examples/expressjs-prisma/README.md @@ -1,3 +1,13 @@ +--- +title: ExpressJS Prisma +description: An ExpressJS server that uses Prisma to connect to a PostgreSQL database +tags: + - express + - postgres + - prisma + - typescript +--- + # ExpressJS Prisma Example This is an [ExpressJS](https://expressjs.com/) REST API that uses [Prisma](https://www.prisma.io/) to connect to a Postgres database and CRUD todos. diff --git a/examples/expressjs/README.md b/examples/expressjs/README.md index df4e3f8..ff63804 100644 --- a/examples/expressjs/README.md +++ b/examples/expressjs/README.md @@ -1,3 +1,11 @@ +--- +title: ExpressJS +description: An ExpressJS server +tags: + - express + - typescript +--- + # ExpressJS Example This example starts an [ExpressJS](https://expressjs.com/) server. diff --git a/examples/fastapi/README.md b/examples/fastapi/README.md index 2965df4..5c00e54 100644 --- a/examples/fastapi/README.md +++ b/examples/fastapi/README.md @@ -1,4 +1,5 @@ # FastAPI-Railway.app + A sample python **[FastAPI](https://fastapi.tiangolo.com/)** (api app) to run on **[Railway.app](https://railway.app)** To setup and run Railway app follow these steps https://docs.railway.app/getting-started @@ -8,25 +9,28 @@ Few things different from the [Flask example](https://github.com/railwayapp/star Main difference between Flask and FastAPI is, Flask is WSGI and FastAPI is ASGI so Flask gunicorn wont work with FastAPI, you need to use uvicorn instead of gunicorn. - Procfile is modified to call the 'python main.py' -- main.py uses uvicorn to start the app from __main__ function +- main.py uses uvicorn to start the app from **main** function - In uvicorn.run(...) along with the port it needs host="0.0.0.0" # I am not sure why this is required This sample api includes a random number generator (with min and max limits) ##### App Routes + Route Root + > localhost:8080/ > returns {"Hello": "World from FastAPI"} Route Random (Default) -> localhost:8080/random + +> localhost:8080/random > returns a random number between 0 to 9 > ex:- {"value":8} Route Random with min/max -> localhost:8080/random?min=100&max500 +> localhost:8080/random?min=100&max500 > returns a random number between 100 and 500 > ex:- {"value":421} -Let me know if you have any questions [@prakis](https://twitter.com/prakis) \ No newline at end of file +Let me know if you have any questions [@prakis](https://twitter.com/prakis) diff --git a/examples/flask/README.md b/examples/flask/README.md index 746db8f..91f10cb 100644 --- a/examples/flask/README.md +++ b/examples/flask/README.md @@ -1,3 +1,11 @@ +--- +title: Flask +description: A Flask app +tags: + - python + - flask +--- + # Python Flask Example This is a [Flask](https://flask.palletsprojects.com/en/1.1.x/) app that serves a simple JSON response. @@ -8,8 +16,6 @@ This is a [Flask](https://flask.palletsprojects.com/en/1.1.x/) app that serves a - Python - Flask -- Postgres -- TypeScript ## 💁‍♀️ How to use diff --git a/examples/hapi/README.md b/examples/hapi/README.md index e20660f..cd701c4 100644 --- a/examples/hapi/README.md +++ b/examples/hapi/README.md @@ -1,3 +1,11 @@ +--- +title: Hapi +description: A Hapi server +tags: + - hapi + - typescript +--- + # Hapi Example This example starts a [Hapi](https://hapi.dev/) server. diff --git a/examples/hasura/README.md b/examples/hasura/README.md index e690a5b..b2dd8f6 100644 --- a/examples/hasura/README.md +++ b/examples/hasura/README.md @@ -1,3 +1,11 @@ +--- +title: Hasura +description: A Hasura instance with a PostgreSQL database +tags: + - postgres + - hasura +--- + # Hasura example This example sets up a [Hasura](https://hasura.io/opensource/) instance with a [PostgreSQL](https://www.postgresql.org/) database. diff --git a/examples/http-nodejs/README.md b/examples/http-nodejs/README.md index 922c2bf..3a87ed5 100644 --- a/examples/http-nodejs/README.md +++ b/examples/http-nodejs/README.md @@ -1,3 +1,11 @@ +--- +title: HTTP Module +description: A HTTP module server +tags: + - http + - javascript +--- + # HTTP Module Example This example starts an [HTTP Module](https://nodejs.org/api/http.html) server. diff --git a/examples/laravel/README.md b/examples/laravel/README.md index 3b99365..26a3f39 100644 --- a/examples/laravel/README.md +++ b/examples/laravel/README.md @@ -1,3 +1,12 @@ +--- +title: Laravel +description: A Laravel app that connects to a PostgreSQL database +tags: + - php + - laravel + - postgres +--- + # Laravel Starter Example This is a [Laravel](https://laravel.com/) starter app that connects to a Railway Postgres database. diff --git a/examples/next-notion-blog/README.md b/examples/next-notion-blog/README.md index 91b5379..b0ce202 100644 --- a/examples/next-notion-blog/README.md +++ b/examples/next-notion-blog/README.md @@ -1,3 +1,13 @@ +--- +title: NextJS Notion Blog +description: A NextJS app using Notion as a CMS for a blog +tags: + - next + - notion + - tailwind + - typescript +--- + # NextJS Notion blog example This is an example [NextJS](https://nextjs.org/) app that uses [Notion](https://www.notion.so/) as a CMS for a blog. diff --git a/examples/nextjs-auth-mongo/README.md b/examples/nextjs-auth-mongo/README.md index 40824f1..7acacdc 100644 --- a/examples/nextjs-auth-mongo/README.md +++ b/examples/nextjs-auth-mongo/README.md @@ -1,3 +1,13 @@ +--- +title: NextJS Auth +description: A NextJS app using NextAuth.js for authentication with a MongoDB database +tags: + - next + - nextauth.js + - mongodb + - javascript +--- + # NextJS Auth Example The example is a [NextJS](https://nextjs.org/) app with authentication using [NextAuth.js](https://next-auth.js.org/). diff --git a/examples/nextjs-prisma/README.md b/examples/nextjs-prisma/README.md index 1902231..edaf99b 100644 --- a/examples/nextjs-prisma/README.md +++ b/examples/nextjs-prisma/README.md @@ -1,3 +1,13 @@ +--- +title: NextJS Prisma +description: A NextJS app using Prisma with a PostgreSQL database +tags: + - next + - prisma + - postgres + - typescript +--- + # NextJS Prisma Example This example is a [NextJS](https://nextjs.org/) todo app that uses diff --git a/examples/nuxtjs/README.md b/examples/nuxtjs/README.md index e8f90c1..9ce0768 100644 --- a/examples/nuxtjs/README.md +++ b/examples/nuxtjs/README.md @@ -1,3 +1,11 @@ +--- +title: NuxtJS +description: A basic NuxtJS app +tags: + - nuxt + - typescript +--- + # NuxtJS Example This example starts a basic [NuxtJS](https://nuxtjs.org/) app. diff --git a/examples/rails-blog/README.md b/examples/rails-blog/README.md index 8a39436..7cafdfd 100644 --- a/examples/rails-blog/README.md +++ b/examples/rails-blog/README.md @@ -1,3 +1,12 @@ +--- +title: Rails Blog +description: A Rails blog using a PostgreSQL database +tags: + - ruby + - rails + - postgres +--- + # Rails Blog Example This is a [Ruby on Rails](https://rubyonrails.org/) blog that connects to a Railway Postgres database. diff --git a/examples/rails-starter/README.md b/examples/rails-starter/README.md index c751336..b5f8ac1 100644 --- a/examples/rails-starter/README.md +++ b/examples/rails-starter/README.md @@ -1,3 +1,12 @@ +--- +title: Rails Starter +description: A Rails starter app using a PostgreSQL database +tags: + - ruby + - rails + - postgres +--- + # Rails Starter Example This is a [Ruby on Rails](https://rubyonrails.org/) starter app that connects to a Railway Postgres database. diff --git a/examples/rocket/README.md b/examples/rocket/README.md index f16540f..47c4fd6 100644 --- a/examples/rocket/README.md +++ b/examples/rocket/README.md @@ -1,3 +1,11 @@ +--- +title: Rust Rocket +description: A Rocket webserver +tags: + - rust + - rocket +--- + # Rust Rocket Example This example is a [Rocket](https://rocket.rs) web server diff --git a/examples/sinatra/README.md b/examples/sinatra/README.md index 7f30368..dcb8b22 100644 --- a/examples/sinatra/README.md +++ b/examples/sinatra/README.md @@ -1,3 +1,11 @@ +--- +title: Sinatra +description: A Sinatra webserver +tags: + - ruby + - sinatra +--- + # Sinatra Example This example is a simple [Sinatra](http://sinatrarb.com) webserver. diff --git a/examples/slack-webhook/README.md b/examples/slack-webhook/README.md index f2d1b24..570f014 100644 --- a/examples/slack-webhook/README.md +++ b/examples/slack-webhook/README.md @@ -1,3 +1,11 @@ +--- +title: Express Slack Webhook +description: An ExpressJS server with a POST request to emit a message on Slack +tags: + - express + - typescript +--- + # Slack webhook starter This example starts an [ExpressJS](https://expressjs.com/) server containing a post request to emit a message on Slack. diff --git a/examples/starlette/README.md b/examples/starlette/README.md index 8fbd8bf..cd372c0 100644 --- a/examples/starlette/README.md +++ b/examples/starlette/README.md @@ -1,3 +1,11 @@ +--- +title: Starlette +description: A Starlette app with a simple JSON response +tags: + - python + - starlette +--- + # Python Starlette Example This is a [Starlette](https://www.starlette.io/) app that serves a simple JSON response. @@ -10,8 +18,9 @@ This is a [Starlette](https://www.starlette.io/) app that serves a simple JSON r - Starlette ## 💁‍♀️ How to use + - Build the docker image `docker build -t railway .` - Start the container `docker run -d --name railway-test -p 80:80 railway` - For auto restart in development `docker run -d -p 80:80 -v $(pwd):/app railway /start-reload.sh` -Note: Advance users may refer to [this](https://github.com/tiangolo/uvicorn-gunicorn-starlette-docker) \ No newline at end of file +Note: Advance users may refer to [this](https://github.com/tiangolo/uvicorn-gunicorn-starlette-docker) diff --git a/examples/svelte-kit/README.md b/examples/svelte-kit/README.md index 72db8de..ad31b03 100644 --- a/examples/svelte-kit/README.md +++ b/examples/svelte-kit/README.md @@ -1,3 +1,11 @@ +--- +title: SvelteKit +description: A simple SvelteKit app +tags: + - svelte + - typescript +--- + # SvelteKit Example This examples is a simple [SvelteKit](https://kit.svelte.dev/) app. diff --git a/examples/telegram-bot/README.md b/examples/telegram-bot/README.md index df1e50f..334f983 100644 --- a/examples/telegram-bot/README.md +++ b/examples/telegram-bot/README.md @@ -1,3 +1,12 @@ +--- +title: Telegram Bot +description: An ExpressJS server with a Telegram bot +tags: + - express + - telegraf + - typescript +--- + # Telegram bot example This example starts a [Telegram](https://telegram.org/) bot on an [ExpressJS](https://expressjs.com/) server. diff --git a/examples/umami/README.md b/examples/umami/README.md index 548b3f7..d46c7de 100644 --- a/examples/umami/README.md +++ b/examples/umami/README.md @@ -1,3 +1,12 @@ +--- +title: Umami +description: A self-hosted version of Umami using a PostgreSQL database +tags: + - nextjs + - umami + - postgres +--- + # Umami example This example deploys self-hosted version of [Umami](https://umami.is/). Internally it uses a PostgreSQL database to store the collected data. @@ -5,6 +14,7 @@ This example deploys self-hosted version of [Umami](https://umami.is/). Internal [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new?template=https%3A%2F%2Fgithub.com%2Frailwayapp%2Fexamples%2Ftree%2Fmaster%2Fexamples%2Fumami&plugins=postgresql&envs=HASH_SALT&HASH_SALTDesc=Any+random+string+used+to+generate+unique+values+for+your+installation) ## ✨ Features + - NextJS - Umami - PostgreSQL @@ -20,5 +30,6 @@ This example deploys self-hosted version of [Umami](https://umami.is/). Internal - You can find the URL in your project dashboard which you can visit by running `railway open` ## 📝 Notes + - Make sure you [change your password](https://umami.is/docs/login) after you log in for the first time - Read more about [adding a website](https://umami.is/docs/add-a-website) and [collecting data](https://umami.is/docs/collect-data) here