{"id":20039119,"url":"https://github.com/defra/waste-export-controls-tool","last_synced_at":"2025-05-05T07:32:33.309Z","repository":{"id":42289742,"uuid":"245465307","full_name":"DEFRA/waste-export-controls-tool","owner":"DEFRA","description":"You can use this service to find out what controls apply to exporting your waste from England, Wales, Scotland, or Northern Ireland to the country it’s destined for.","archived":false,"fork":false,"pushed_at":"2023-10-16T19:49:55.000Z","size":837,"stargazers_count":2,"open_issues_count":17,"forks_count":3,"subscribers_count":4,"default_branch":"development","last_synced_at":"2024-04-14T07:53:30.062Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DEFRA.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-06T16:17:16.000Z","updated_at":"2024-04-14T07:53:30.063Z","dependencies_parsed_at":"2023-01-26T09:15:36.763Z","dependency_job_id":null,"html_url":"https://github.com/DEFRA/waste-export-controls-tool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fwaste-export-controls-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fwaste-export-controls-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fwaste-export-controls-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fwaste-export-controls-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DEFRA","download_url":"https://codeload.github.com/DEFRA/waste-export-controls-tool/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224433764,"owners_count":17310578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T10:35:53.706Z","updated_at":"2024-11-13T10:35:54.341Z","avatar_url":"https://github.com/DEFRA.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Waste Export Controls Tool\nYou can use this service to find out what controls apply to exporting your waste from England, Wales, Scotland, or Northern Ireland to the country it’s destined for.\n\n# Environment variables\n(Be sure to describe any environment variables here by maintaining a list like this)\n\n| name     | description      | required | default |            valid            | notes |\n|----------|------------------|:--------:|---------|:---------------------------:|-------|\n| NODE_ENV | Node environment |    no    |         | development,test,production |       |\n| PORT     | Port number      |    no    | 3000    |                             |       |\n\n# Prerequisites\n\nNode v8+\n\n# Running the application\n\nFirst build the application using:\n\n`$ npm install`\n\nCurrently this will install the required packages and build the `govuk-frontend` sass.\n\nNow the application is ready to run:\n\n`$ npm start` or `$ node index.js`\n\n## Getting started\n\nClone this repo and run through the checklist above.\n\nCheck the server is running by pointing your browser to `http://localhost:3000`\n\n## Project structure\n\nHere's the default structure of the project files.\n\n* **bin** (build tasks)\n* **client** (client js/sass code)\n* **server**\n  * **plugins**\n  * **public**  (This folder is publicly served)\n    * **static** (Put all static assets in here)\n    * **build** (This contains the build output files (js/css etc.) and is not checked-in)\n  * **routes**\n  * **views**\n  * config.js\n  * index.js (Exports a function that creates a server)\n* **test**\n* README.md\n* index.js (startup server)\n\n## Config\n\nThe configuration file for the server is found at `server/config.js`.\nThis is where to put any config and all config should be read from the environment.\nThe final config object should be validated using joi and the application should not start otherwise.\n\nA table of environment variables should be maintained in this README.\n\n## Plugins\n\nHapi has a powerful plugin system and all server code should be loaded in a plugin.\n\nPlugins live in the `server/plugins` directory.\n\n## Logging\n\nThe [good](https://github.com/hapijs/good) and [good-console](https://github.com/hapijs/good-console) plugins are included and configured in `server/plugins/logging`\n\nThe logging plugin is only registered in when `NODE_ENV=development`.\n\nError logging for production should use errbit.\n\n## Views\n\nThe [vison](https://github.com/hapijs/vision) plugin is used for template rendering support.\n\nThe template engine used in nunjucks inline with the GDS Design System with support for view caching, layouts, partials and helpers.\n\n## Static files\n\nThe [Inert](https://github.com/hapijs/inert) plugin is used for static file and directory handling in hapi.js.\nPut all static assets in `server/public/static`.\n\nAny build output should write to `server/public/build`. This path is in the `.gitignore` and is therefore not checked into source control.\n\n## Routes\n\nIncoming requests are handled by the server via routes. \nEach route describes an HTTP endpoint with a path, method, and other properties.\n\nRoutes are found in the `server/routes` directory and loaded using the `server/plugins/router.js` plugin.\n\nHapi supports registering routes individually or in a batch.\nEach route file can therefore export a single route object or an array of route objects.\n\nA single route looks like this:\n\n```js\n{\n  method: 'GET',\n  path: '/hello-world',\n  options: {\n    handler: (request, h) =\u003e {\n      return 'hello world'\n    }\n  }\n}\n```\n\nThere are lots of [route options](http://hapijs.com/api#route-options), here's the documentation on [hapi routes](http://hapijs.com/tutorials/routing)\n\n## Testing\n\n[lab](https://github.com/hapijs/lab) and [code](https://github.com/hapijs/code) are used for unit testing.\n\nSee the `/test` folder for more information.\n\n## Linting\n\n[standard.js](http://standardjs.com/) is used to lint both the server-side and client-side javascript code.\n\nIt's defined as a build task and can be run using `npm run lint`.\n\n## License\n\nTHIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:\n\nhttp://www.nationalarchives.gov.uk/doc/open-government-licence/version/3\n\nThe following attribution statement MUST be cited in your products and applications when using this information.\n\n\u003e Contains public sector information licensed under the Open Government license v3\n\n### About the license\n\nThe Open Government Licence (OGL) was developed by the Controller of Her Majesty's Stationery Office (HMSO) to enable information providers in the public sector to license the use and re-use of their information under a common open licence.\n\nIt is designed to encourage use and re-use of information freely and flexibly, with only a few conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Fwaste-export-controls-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefra%2Fwaste-export-controls-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Fwaste-export-controls-tool/lists"}