Our website open-fixture-library.org/ is a Nuxt instance running on an Express server. That means that every page is a Vue component that is rendered on the server. Users that have JavaScript enabled can navigate purely on the client-side though, so only a small page-specific JavaScript file is downloaded via XHR and rendered in the browser. All that is handled automatically by Nuxt.
Locally, running npm run dev
(after the initial setup) starts the development server at http://localhost:3000/
with hot module reloading, i.e. a changed Vue component file automatically patches only that component without having to reload the whole page. The port can be changed with the environment variable PORT
, e.g. in the .env
file.
Note: for non-UI-related folders, see README.md.
ui/
api/
– Handlers that respond to AJAX resquests from the frontend (see the REST API reference)assets/
– Icons, scripts, stylesheets, etc.components/
– Reusable Vue componentsexpress-middleware/
– Functions that directly hook into Express.js (the server side router)layouts/
– Whole-page Nuxt layoutspages/
– All website pages (in the correct directory structure) as Vue componentsplugins/
– Nuxt plugins that load and instantiate external modulesstatic/
– Resources that don't need processing before being served
nuxt.config.js
Every time a new pull request is merged into the master branch, the new version is automatically deployed to https://open-fixture-library.org/ (see the server/
directory).