Giter Club home page Giter Club logo

cccatalog-frontend's Introduction

cccatalog-frontend

About

Repository containing the CC Search frontend application. This web app contains all the UI which communicates with the CC Search API to get the data that is rendered in the browser.

CC Search is an interface to search for content that is licensed under Creative Commons licenses or in the public domain.

The frontend app is built using Vue.JS, Babel and Webpack.

Getting Started

Run the following commands in order to have the code up and running on your machine:

# installs dependencies
$ npm install

# Builds and serves assets with hot-reload 
$ npm run dev

Docker setup

Alternatively, you can use Docker to build and run the application. You just have to run:

$ docker-compose up

You should now have the application running and accessible at https://localhost:8443 (note: it runs on https://, not http://). Since it runs on HTTPS, you will probably see a invalid certificate privacy notice on your browser when accessing it. Just follow your browser's instructions to continue and access the website anyway.

If you absolutely need a non-HTTP version, run npm run dev-insecure instead of npm run dev. This is not recommended for most uses.

You don't need to have the CC Search API running locally to be able to run the frontend application. It's configured to communicate, by default, with the API that's already publicly available. If you wish, you can change the URL of the API that's used during development at https://github.com/creativecommons/cccatalog-frontend/blob/master/config/dev-env.js#L7

Running tests

You can run the tests by executing:

npm run test

localhost tunneling

If you want to make your local development server accessible to the internet (for testing or showing someone something you're working on), you can use ngrok. Follow the documentation on the ngrok site to install it and set it up. Once you have it installed, get the development server for CC Search running and in a separate window/tab, run:

# The extra parameters are required to ensure that ngrok redirects to the HTTPS version of the site
# and that the host header matches one that is accepted by the server
# (ngrok's default hostname is randomly generated and is not whitelisted).
ngrok http https://localhost:8443 -host-header="localhost:8443"

If you need to run a HTTP version (for example, if you're testing against third-party websites that do not accept the self-signed cerificate generated by the dev server), run the dev server using npm run dev-insecure and use the following command to start ngrok:

ngrok http 8443 -host-header="localhost:8443"

Deployment

Details about how to deploy the frontend code can be found on the CC Wiki (Accessible to CC Staff only).

cccatalog-frontend's People

Contributors

akowtko avatar aldenstpage avatar amazzoccone avatar ashikmeerankutty avatar ayushshivani avatar brenoferreira avatar dhruvkb avatar elharony avatar faris avatar fizal619 avatar geekayush avatar joshharrison626 avatar kgodey avatar krysal avatar pratikmishra356 avatar sebworks avatar sgrepos avatar somtochiama avatar sudharsana-kjl avatar thecelestial25 avatar vatsalsin avatar zackkrida 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.