All Projects → kt3k → now-deno-example

kt3k / now-deno-example

Licence: MIT license
A demo application of now-deno and deno-postgres.

Programming Languages

HTML
75241 projects
typescript
32286 projects

Projects that are alternatives of or similar to now-deno-example

marky
A modular and extensible ESM and Deno Markdown parser.
Stars: ✭ 16 (-46.67%)
Mutual labels:  deno
deno rest
A Boilerplate for deno RESTful apis
Stars: ✭ 74 (+146.67%)
Mutual labels:  deno
carol
A Deno port of carlo
Stars: ✭ 63 (+110%)
Mutual labels:  deno
deno doc
Documentation generator for Deno
Stars: ✭ 162 (+440%)
Mutual labels:  deno
attain
Deno API middleware Server
Stars: ✭ 79 (+163.33%)
Mutual labels:  deno
parseargs
Migrated to https://github.com/denoland/deno_std
Stars: ✭ 28 (-6.67%)
Mutual labels:  deno
create-xc-app
⚡️ Create a project in seconds!
Stars: ✭ 15 (-50%)
Mutual labels:  deno
mock
Utilities to help mock behavior, spy on function calls, stub methods, and fake time for tests.
Stars: ✭ 31 (+3.33%)
Mutual labels:  deno
docker-craft-nginx
🐳 A minimal Docker container for Craft CMS, intended for use with zeit-now.
Stars: ✭ 26 (-13.33%)
Mutual labels:  zeit-now
deno-dex
🦕 A dexterous deno executor
Stars: ✭ 19 (-36.67%)
Mutual labels:  deno
sirdez
Glorious Binary Serialization and Deserialization for TypeScript.
Stars: ✭ 20 (-33.33%)
Mutual labels:  deno
deno docker
Latest dockerfiles and images for Deno - alpine, centos, debian, ubuntu
Stars: ✭ 678 (+2160%)
Mutual labels:  deno
deno sass
🚀 Cute Sass compiler bindings to Deno.
Stars: ✭ 13 (-56.67%)
Mutual labels:  deno
dps-dial.vim
Increment/decrement plugin using denops.vim
Stars: ✭ 21 (-30%)
Mutual labels:  deno
drash
A microframework for Deno's HTTP server with zero third-party dependencies
Stars: ✭ 1,013 (+3276.67%)
Mutual labels:  deno
crux.land
crux.land is a free registry service meant for hosting small (≤ 20kB) single deno scripts.
Stars: ✭ 50 (+66.67%)
Mutual labels:  deno
deno-bcrypt
A port of jBCrypt to TypeScript for use as a Deno module
Stars: ✭ 56 (+86.67%)
Mutual labels:  deno
azure-webapps-deno-deploy
A GitHub Action for deploying Deno 🦕 web apps to Azure ☁️
Stars: ✭ 27 (-10%)
Mutual labels:  deno
EventSource
EventSource in Deno
Stars: ✭ 18 (-40%)
Mutual labels:  deno
http compression
🗜️ Deno HTTP compression middleware
Stars: ✭ 34 (+13.33%)
Mutual labels:  deno

now-deno-demo

Very simple BBS written in Deno, running on Zeit Now.

Architecture

  • Runs on Zeit Now, which means each endpoint runs as a serverless function.
  • Written in Deno.
  • Stores the data in Postgres DB.
  • Single Page App, written in vanilla JS.

How to run this demo

You need postgres DB instance to run this demo. You can get a free instance from generous database hosting services such as AWS RDS, ElephantSQL, etc.

You need Now and need to set the following information in now secrets

now secrets add pguser <The postgres user name>
now secrets add pgpassword <The postgres user name>
now secrets add pghost <The postgres db hostname>
now secrets add pgdatabase <The postgres databasename>
now secrets add pgport <The postgres port>

You need to create a database in your postgres DB:

CREATE DATABASE bbs ENCODING 'UTF-8';

You need to create the following table:

CREATE TABLE posts(
  id SERIAL PRIMARY KEY,
  name VARCHAR(255),
  body TEXT,
  created_at TIMESTAMP NOT NULL DEFAULT NOW()
);

I recommend you insert some of rows before starting:

INSERT INTO posts (name, body) VALUES ('alice', 'hi');
INSERT INTO posts (name, body) VALUES ('alice', 'anyone here?');
INSERT INTO posts (name, body) VALUES ('bob', 'hey');
INSERT INTO posts (name, body) VALUES ('bob', 'anyone?');

Then hit the command now and that should run this app in your now account.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].