Giter Site home page Giter Site logo

m0ver / tinystruct-examples Goto Github PK

View Code? Open in Web Editor NEW
64.0 15.0 198.0 63.2 MB

The framework is quite easy to be used, but in order to help you to understand deeply, we prepared some code examples for your reference. It might be helpful for you to hand it easily.

License: Apache License 2.0

Java 85.34% Shell 8.86% Batchfile 3.22% Dockerfile 0.48% Procfile 0.20% CSS 1.90%

tinystruct-examples's Introduction

tinystruct framework

Build Status

This is an example project based on tinystruct framework, it supports both C/S application and B/S web application development.

To execute it in CLI mode

$ bin/dispatcher --version

  _/  '         _ _/  _     _ _/
  /  /  /) (/ _)  /  /  (/ (  /  1.2.3
           /
$ bin/dispatcher --help
Usage: bin/dispatcher COMMAND [OPTIONS]
Commands: 
        download                Download a resource from other servers
        exec                    To execute native command(s)
        generate                POJO object generator
        install                 Install a package
        open                    Start a default browser to open the specific URL
        say                     Output words
        set                     Set system property
        sql-execute             Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.
        sql-query               Executes the given SQL statement, which returns a single ResultSet object.
        update                  Update for latest version

Options: 
        --allow-remote-access   Allow to be accessed remotely
        --help                  Help command
        --host                  Host name / IP
        --import                Import application
        --logo                  Print logo
        --settings              Print settings
        --version               Print version

Run 'bin/dispatcher COMMAND --help' for more information on a command.

$ bin/dispatcher say/"Praise to the Lord"
Praise to the Lord

Run it in a servlet container

# bin/dispatcher start --import org.tinystruct.system.TomcatServer

Run it in docker container

# wget https://github.com/tinystruct/tinystruct2.0/archive/master.zip
# unzip master.zip
# mv tinystruct2.0-master/Dockerfile .
# docker build -t tinystruct-based:1.0 -f Dockerfile .
# docker run -d -p 777:777 tinystruct-based:1.0

You can access the below URLs after deployed the project in Tomcat 6.0+ :

A demonstration for comet technology, without any websocket and support any web browser:


Live Demo Site:

Results in your browser should be:

Praise to the Lord!

Praise to the Lord! true

你知道全世界最畅销的书是哪一本书吗?

Explore it

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Bitdeli Badge

tinystruct-examples's People

Contributors

m0ver avatar thomashuang025 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.