Code Monkey home page Code Monkey logo

slinky-todos's Introduction

Todo List with Slinky

Goals

  • Having a minimal Client-Server Setup, using Scala.
  • Using Slinky on the Client side.
  • Having a decent UI.

git clone https://github.com/pme123/slinky-todos.git

Screenshot.png

Try it out

docker run --publish 8883:8883 --name todos pame/slinky-todos:0.2.0

Open the Browser http://localhost:8883/.

Usage in Dev

Server Development

sbt server/run

This starts the Web Server on Port 8883.

This copies the client assets to the classpath of the server. So make sure you run build before.

Or use the client as described in the next chapter.

Client Development

sbt dev

This will watch all your changes in the client and automatically refresh your Browser Session.

Open in the Browser http://localhost:8024.

Production Build

sbt release

Creates an optimized Client bundle and adds it to the Server Library.

The whole distribution you can find here: ./server/target/universal/stage.

You can start the server like this:

  • Mac / Linux: ./server/target/universal/stage/bin/slinky-todos-server
  • Windows: ./server/target/universal/stage/bin/slinky-todos-server

Docker

sbt server/docker:publishLocal

If you want to build another distribution check here for the possibilities: sbt-native-packager

Thanks to

This example is more or less a mashup from different Github projects:

Scala.js SPA-tutorial

The Communication between client and server I took from this excellent tutorial.

React Ant Design Todo List

I just translated the React Code from this project to Scala/Slinky. I made some simplifications, like skipping 'redux' and 'routing'

Scalably Slinky Demo

This project has also a Demo for Ant Design. So after spending some time, trying to figure it out - I found there all code snippets I needed.

My Scalably Slinky example

A simple project that contains only the client side.

Technologies

Shared

  • Autowire:

    Autowire is a pair of macros that allows you to perform type-safe, reflection-free RPC between Scala systems.

  • BooPickle:

    BooPickle is the fastest and most size efficient serialization (aka pickling) library that works on both Scala and Scala.js.

Client

  • Slinky

    Write React apps in Scala just like you would in ES6

  • Scalably Typed

    The Javascript ecosystem for Scala.js! I used the facades for Ant Design

  • Ant Design

    A design system for enterprise-level products. Create an efficient and enjoyable work experience.

Server

  • http4s

    Typeful, functional, streaming HTTP for Scala.

slinky-todos's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

renghen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.