Giter Club home page Giter Club logo

ukforeignoffice.lists's Introduction

FCDO Lists

Development

Develop using docker-compose

docker-compose up to start the following services:

  1. server: The lists application which is accessible on PORT:3000
  2. PostgreSQL: The PostgreSQL database with PostGis which is accessible on PORT:5432 (please see docker-compose.yml file for database user and password)
  3. pgadmin: The PgAdmin GUI app so you can manage the database, it is accessible on PORT:8080 (please see docker-compose.yml file for user and password)
  4. pghero: A performance dashboard for Postgres, it is accessible on PORT:8081

If you like you can start each service independently:

  1. docker-compose up server
  2. docker-compose up postgres
  3. docker-compose up pgadmin
  4. docker-compose up pghero

To force a rebuild (for example if a new npm module has been installed) use the --build flag docker-compose up server --build

Debugging

If you are using VSCode the debugger is already configured with Docker: Attach to Node, just start debugging and enjoy it.

PgAdmin

Use PgAdmin service to connect and manage Postgres, run docker-compose up pgadmin and open the service at http://localhost:8080/ (user and password are in docker-compose.yml file).

Then create a server with the following connection settings: HostName=postgres, username and password (see docker-compose.yml POSTGRES_USER and POSTGRES_PASSWORD)

Codebase

.
├── .circleci                 # CircleCI configurations
├── .github                   # Github configuration such as workflows, dependabot and etc
├── .jest                     # Jest related configuration files, such as environment variables
├── .vscode                   # VSCode related settings
├── config                    # General development configuration files which are not directly related to `src`
├── dist                      # Babel's output folder (npm start/dev points here)
├── src                       
│   ├── config                # Anything related to service config, such as environment variables
│   ├── public                # Public assets folders (see `src/server/middlewares/static.ts`)
│   ├── server                # Server MVC codebase
│   ├── services              # Independent services which can be used by both client or server
│   └── index.ts              
├── LICENSE
└── README.md

The application code resides inside /src folder and Nodemon will watch for changes and rebuild/restart the application inside docker. Important: When the application is build inside docker a dist folder will be created on your workspace, this is necessary so VSCode debugging works properly.

Coding Style and Lint

We are using https://standardjs.com/, eslint-config-standard-with-typescript and https://prettier.io/ for code styling and formatting.

Pre-Commit and Pre-Push Hooks

Lint and prettier formatting will be run on a pre-commit hook and Typescript type check will be run on a pre-push hook. To by pass them you can use the --no-verify flag, e.g: "git commit -m 'msg' --no-verify".

Continuous Integration

TODO:Semantic release

ukforeignoffice.lists's People

Contributors

dependabot[bot] avatar bertrandmc avatar superafroman 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.