• Stars
    star
    1
  • Language
    JavaScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Realtime Todo application developed with Kemal, Websockets, ES2015 and PostgreSQL

Todo Basic App (Crystal - Kemal - WebSockets - PostgreSQL)

Requirements

  • Crystal 0.18.7
  • PostgreSQL (I have the v9.5.2)
  • Node (I have the v5.11.1)
  • NPM (I have the v3.8.6)

*Node and NPM are both optional if you are just going to run the app, but necessary for development since they are needed to run the gulp tasks that build the static files

Installation

Before you can run this program you have to install the packages that it uses. You do that with $ shards install . You also need to change the path to the PostgreSQL database in src/db/init_db.cr and src/notes.cr

# src/db/init_db.cr
require "pg"

# Configure these two variables
DB_NAME = "db_name"
PG_PATH = "postgres://user:password@localhost:5432"

...
# src/notes.cr
require "kemal"
require "json"
require "pg"
require "./app/lib/note"

public_folder "src/public"

COMPOSE = ".compose_psql_db_path"

# Configure the path of the database based on what you did in the src/db/init_db.cr file
DB_PATH = File.file?(COMPOSE) ? File.read(COMPOSE) : "postgres://user:password@localhost:5432/db_name"

...

Once you have installed the dependencies and configured the database path, you need to create the actual database and table for the application. You do that by running $ crystal src/db/init_db.cr.

Run Project

You can run this program in two ways:

  1. Compile/build the project using the command line with $ crystal build src/notes.cr --release and run the executable $ ./notes
  2. Run the program with $ crystal src/notes.cr (no compilation required)

Once you have run the program, you can open a browser window at localthost:3000 and see the actual app. You can open the app in several browser windows and see how they change in real time via websockets.

Live Demo

You can see and use a live demo of the app here: kemalwspgtodo.herokuapp.com.

*Take in mind that this is just a dummy app written in few hours as a proof of concept.

More Repositories

1

Loopa-News

Realtime social news app developed from scratch with Elixir, Phoenix, Vue and Vuex
JavaScript
319
star
2

elixir-cowboy-react-spa

Example application that shows how to use Cowboy 2.0 in conjunction with React and Redux to create data driven Single Page Applications
JavaScript
117
star
3

phoenix-vue-demo

Basic app developed with Phoenix and Vue 2.0, including authentication.
JavaScript
77
star
4

realtime-todo-app

Realtime Todo application developed with Kemal, React, ES2015 and PostgreSQL
JavaScript
19
star
5

chat-app-demo

Chat application developed with Kemal, React, ES2015 and PostgreSQL
Crystal
16
star
6

kemal-ws-todo-app

Realtime Todo application developed with Kemal and Websockets
JavaScript
6
star
7

quick-xml2js-parser

XML to JS parser written in Rust, using the Neon bindings https://neon-bindings.com
Rust
4
star
8

Population.ex

Elixir OTP application library for the World Population API
Elixir
4
star
9

elm-crystal-chat

JavaScript
2
star
10

udemy_courses_scraping

Ruby
2
star
11

elm-subscriptions-basics

Elm
2
star
12

es6-simple-curry

simple curry javascript function
JavaScript
2
star
13

codility-lessons

My solutions for the Codility.com lessons problems
JavaScript
2
star
14

elm-role-players-app

Elm
2
star
15

example-basic-todo-list

1
star
16

elm-list-functions

Elm
1
star
17

jscodeshift-core-api

Lean package containing a subset of the jscodeshift core api
JavaScript
1
star
18

extract-metadata

JavaScript
1
star
19

elm-commands-basics

Elm
1
star
20

react-redux-express-crud

JavaScript
1
star
21

elm-first-steps

Elm
1
star
22

naive-translate-cli

JavaScript
1
star
23

elm-ascii-store

Elm
1
star
24

basic-cowboy-rest

Erlang
1
star
25

learning_rust_collections_exercises

Rust
1
star
26

elixir-concurrent-scraper

Concurrent scraper developed with Elixir
Elixir
1
star
27

learning_rust-2_guessing_game

Rust
1
star