Giter VIP home page Giter VIP logo

clojars-web's Introduction

Clojars web interface

CircleCI Dependencies Status

This is the source code for the Clojars jar repository webapp.

If you're looking for user documentation, try the wiki. There is a also a FAQ.

See release announcements on the mailing list for recent user-facing changes.

Contributing

Please report bugs or problems with the repository on the bug tracker.

Design discussions occur on the clojars-maintainers list and the #leiningen channel on irc.freenode.org.

If you'd like contribute a change please send a GitHub pull request for a topic branch. Feel free to open a pull request early with a "not ready for merging" note or ask on the mailing list or IRC to get feedback from other contributors. If you are looking for a task to work on, take a look at issues labeled ready.

We try to make releases fairly soon after merging contributions, but post to the mailing list if it's been a week or two and you'd like something pushed to the production website.

Development

Note: Java 8+ is required

Development system

To begin developing, start with a REPL.

lein repl

Run migrate to initialize the database to the latest migration.

user=> (migrate)
...

or alternatively, from the command line.

$ lein run -m user/migrate

Run go to initiate and start the system.

user=> (go)
:started

By default this creates a running development system at http://localhost:8080.

Note: You may get the following error in the browser when accessing the dev system after running (go) for the first time:

No implementation of method: :-report-error of protocol: #'clojars.errors/ErrorReporter found for class: clojars.errors.StdOutReporter

If so, running (go) a second time should eliminate the error.

When you make changes to your source files, use reset to reload any modified files and reset the server.

user=> (reset)
:reloading (...)
:resumed

If you'd like to hack on the UI or search it might be useful to have production-like metadata. To create that, use clojars.tools.setup-dev/-main to create test users, import an existing maven repository (your local ~/.m2/repository/ works well), and setup a search index:

cp -r ~/.m2/repository data/dev_repo
lein run -m clojars.tools.setup-dev

If you want to use the actual repo from clojars.org, you can grab it via rsync.

Note that this setup task isn't perfect - SNAPSHOTS won't have version-specific metadata (which won't matter for the operation of clojars, but may matter if you try to use the resulting repo as a real repo), and versions will be listed out of order on the project pages, but it should be good enough to test with.

Testing

Testing is designed to work in a REPL to allow flow.

user=> (test)
...
user=> (test #'clojars.test.unit.db/added-users-can-be-found)
...

Tests can also be run through Leiningen for CI.

lein test

Production system with development config

Occasionally it can be useful to start a production system based on the development configuration. This can be done by lein run.

Deployment

Also see Configuration.

  1. Compile with: lein uberjar
  2. Deploy target/uberjar/clojars-web-*-standalone.jar to the server
  3. Run the migrations java -cp clojars-web-*-standalone.jar clojure.main -m clojars.tools.migrate-db
  4. Run the production system: java -jar clojars-web-*-standalone.jar

Configuration

The default configuration is loaded from resources/default_config.edn. To override values from the default config, place them in map in an edn file, and specify the path to that file via the clojars.config.file system property.

When running automated tests at the repl, or with lein test, a test environment is used to provide isolation. It can be found in test/clojars/test/test_helper.clj.

License

Copyright © 2009-2017 Alex Osborne, Phil Hagelberg, Nelson Morris, Toby Crawley, Daniel Compton and contributors.

Distributed under the Eclipse Public License, the same as Clojure. See the file COPYING.

clojars-web's People

Contributors

arronmabrey avatar ato avatar beppu avatar chbrown avatar cldwalker avatar danielcompton avatar deraen avatar devn avatar dotemacs avatar firthh avatar glts avatar heyvito avatar kimsnj avatar lfn3 avatar losingkeys avatar lrenn avatar martinklepsch avatar moredhel avatar mynomoto avatar nberger avatar pupeno avatar scottjad avatar shaaza avatar shafeeq avatar technomancy avatar tobias avatar tomjkidd avatar wiseman avatar wstrinz avatar xeqi avatar

Watchers

 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.