Git Product home page Git Product logo

tyrian-url-dsl-routing's Introduction

Hello Tyrian

What is it?!

This project is related to my Pull Request:

PurpleKingdomGames/tyrian#195

With help of url-dsl library I baked simple working front-end routing solution which works pretty well with Tyrian. There are several URLs:

  1. /home
  2. /counter
  3. /todos
  4. /id/:userId, where userId is meant to be Int
  5. /user with query parameter age (also meant to be Int).

All the other URLs are redirected to custom notFound page. Besides of routing I also added two simple subcomponents to show how to modularize application.

Setup instructions

To run the program in a browser you will need to have yarn (or npm) installed.

Before your first run and for your tests to work, you must install the node dependencies with:

yarn install

This example uses Parcel.js as our bundler and dev server, there are lots of other options you might prefer like Webpack, scalajs-bunder, or even just vanilla JavaScript.

We recommend you have two terminal tabs open in the directory containing this README file.

In the first, we'll run sbt.

sbt

From now on, we can recompile the app with fastLinkJS or fullLinkJS but please note that the tyrianapp.js file in the root is expecting the output from fastLinkJS.

Run fastLinkJS now to get an initial build in place.

Then start your dev server, with:

yarn start

Now navigate to http://localhost:1234/ to see your site running.

If you leave parcel's dev server running, all you have to do is another fastLinkJS or fullLinkJS and your app running in the browser should hot-reload the new code.

tyrian-url-dsl-routing's People

Contributors

deamondev avatar

Stargazers

 avatar

Watchers

 avatar

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.