Edge is designed to be built upon. You are free to make whatever changes you like (additions and deletions), in accordance with the License (MIT).

1. Clone Edge

We anticipate you a clone of Edge per context producing a group of applications. In this case, context might be you alone as a hobbyist, within a company, or as a small team in a larger company.

Edge can be used to co-host multiple applications in a single repo, this is to encourage re-use and modularization.

Note
Windows WSL users should perform the clone outside of the Linux filesystem. For most users this will mean /mnt/c/Users/$USER/.
Clone fresh project
src$ git clone https://github.com/juxt/edge.git acme
Cloning into 'acme'...
src$ cd acme
acme$ git remote remove origin (1)
acme$ git remote add origin git@github.com:acme/acme.git (2)
  1. Remove the default Edge upstream, this is to prevent you from accidentally pushing there!

  2. Replace acme/acme with the name of your freshly created repo on Github, or generally the git url you intend to use. This is optional if you’re not planning on using git beyond locally.

In order to have access to updates from Edge periodically, such as dev/prod enhancements and bug fixes, we recommend merging Edge upstream periodically.

acme$ ./bin/update-edge
Warning
A refactoring occurred around the 18th of March 2019 which requires you to run ./bin/update-edge twice.

2. Create a new app

With your new project created, you’re ready to create an app. Apps are deps.edn projects within Edge which are intended to be run as a server or similar.

From the root of the repo, run the ./bin/app script. It can be run with an optional flags which add support for Sass or Clojurescript, these are --sass and --cljs respectively.

Note

Your project name should be namespaced to match your application. If your company was named "Acme" you might use "acme/api" or "com.acme/api".

If you’re unsure, use your company name at work, or your github username for hobby projects. There’s a low chance of conflicts in an application.

The project namespace will determine the Clojure namespaces within your application.

edge$ ./bin/app acme/api
edge$ ./bin/app acme/blog --sass
edge$ ./bin/app acme/dashboard --cljs
edge$ ./bin/app acme/radar --sass --cljs

3. Documentation

We think it’s a good idea to continue to document your project as we’ve done with Edge. You might want to update the CSS stylesheet, source highlighting and other Asiidoctor attributes. They can be found in doc/resources/doc/asciidoctor/attributes.edn.

link:resource:doc/asciidoctor/attributes.edn[]

If the footer has a copyright declaration from JUXT, you can update this by updating doc/resources/doc/docinfo/docinfo-footer.html. This file name must not be changed as it is looked for by Asciidoctorj when generating the HTML output.

link:resource:doc/docinfo/docinfo-footer.html[]

4. License

The MIT License (MIT)

Copyright © 2016-2018 JUXT LTD.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.