Git Product home page Git Product logo

ceylon-web-ide-backend's Introduction

Ceylon Web IDE

This is a web-based IDE for writing and testing Ceylon modules, itself written in pure Ceylon, with the following features:

  • code editor based on Code Mirror
  • support for editing Ceylon, JavaScript, and MarkDown
  • syntax highlighting
  • live error reporting
  • autocompletion
  • online documentation "hover"
  • run and stop
  • multi-file support ("Advanced" mode)
  • support for importing modules from Ceylon Herd
  • persistence to Gist and sharing
  • light and dark editor themes

The Web IDE is used in production at http://try.ceylon-lang.org.

The Web IDE as a technology demo

The module com.redhat.ceylon.ide.web found in the source directory demonstrates the use of Ceylon as language for server-side programming, including:

  • the HTTP server and client APIs in ceylon.net
  • JSON generation and parsing via ceylon.json
  • interoperation with native Java libraries (the Ceylon typechecker and JavaScript compiler, and txtmark, a Java MarkDown processor)
  • Ceylon's powerful dependency management.

Furthermore, this project demonstrates deployment to the OpenShift platform via the Ceylon cartridge.

Compiling and running

Simplest with the Ceylon Bootstrap:

./ceylonb run --compile com.redhat.ceylon.ide.web

But the master branch most likely uses an unreleased Ceylon distribution so compilation/execution might fail with conflicting language version errors.

In that case you can either check out a specific version branch (eg. version-1.3.2) or if you feel adventurous you can first build the latest version of the Ceylon compiler and then compile by going into the ceylon-web-ide-backend directory, and typing:

ceylon compile

Then to run the server, type:

ceylon run com.redhat.ceylon.ide.web

Finally, go to:

http://localhost:8080/

To run the server on a different address and port, use:

ceylon run com.redhat.ceylon.ide.web -address=<address> -port=<port>

Running from Ceylon IDE

To run the project from Ceylon IDE, first use File > Import... to import this project into the IDE, then select the module com.redhat.ceylon.ide.web in the Ceylon Explorer and, from the context menu, select Run As > Ceylon Java Application or Debug As > Ceylon Java Application.

Deploying to OpenShift

You can deploy the server to OpenShift via the web console or using the command line tool. If you've made changes to the code, you must first publish your fork of this project to a Git repository.

Via the OpenShift web console

To deploy the server via the OpenShift web console:

  1. Click Add Application...
  2. Click Ceylon in the list of cartridge types.
  3. Choose a Public URL, ide, or whatever you like, enter the Source Code URL https://github.com/ceylon/ceylon-web-ide-backend.git for branch version-1.3.3-SNAPSHOT, or the URL of your fork of this project.
  4. Click Create Application and wait for the application to be deployed.

Using rhc

To deploy the server with the rhc command line tool, first install rhc, and then type:

rhc app create ide\
--from-code https://github.com/ceylon/ceylon-web-ide-backend.git\
https://raw.github.com/ceylon/openshift-cartridge/master/metadata/manifest.yml

Replace the first URL with the URL of your fork of this project if necessary.

Enabling GitHub authentication

Finally, you must set the environment variables GITHUB_CLIENTID and GITHUB_CLIENTSECRET in order to enable GitHub authentication. (If you skip this step, everything else will still work, but you won't be able to connect to Gist.)

First, register your application with GitHub to obtain an OAuth Client ID and Client Secret.

Now use rhc to set the environment variables on the server:

rhc env set GITHUB_CLIENTID=<Client-ID> GITHUB_CLIENTSECRET=<Client-Secret> -a ide

License

The content of this repository is released under the ASL v2.0 as provided in the LICENSE file that accompanied this code.

By submitting a "pull request" or otherwise contributing to this repository, you agree to license your contribution under the license mentioned above.

ceylon-web-ide-backend's People

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.