Skip to content

Source code for Maxfacts.uk – Information on all aspects of oral and maxillofacial surgery for patients, carers and professionals

Notifications You must be signed in to change notification settings

laurenkt/Maxfacts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maxfacts

Web application to serve and manage Maxfacts pages.

Installation

Install dependencies with npm:

cd maxfacts
npm install

Then start the server:

npm start

If this is the first time running the application you may want to restore from one of the most recent backups (see Backups section below).

Note: you will need the MONGOHQ_URL environment variable set with the MongoDB URL, you can do this in a .env file or by prefixing the start command with the variable:

# Put in a .env file
echo "MONGO_URI=mongodb://localhost/dbname" > .env

# OR:

# Prepend directly into the start command
MONGO_URI="mongodb://localhost/dbname" npm start

The default configuration watches the project directory for changes and restarts node server automatically.

Stylesheets are implemented using Sass with the .scss extension - these are automatically compiled to CSS.

Javascript in the client directory will be compiled with Babel supporting React/JSX.

Note: to host the dev server on a particular port it is easiest to map that port to 3000: sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000

Backups

Backups by default are made in the backups/ directory.

You can make a new backup at any time with:

npm run backup

To restore from a backup, use

npm run restore

to restore the most recent backup. Otherwise navigate to the directory where the backup is contained and use mongorestore:

mongorestore -d maxfacts maxfacts

AWS

Login

  1. Use saml2aws
  2. aws --profile saml ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin 025081378045.dkr.ecr.eu-west-1.amazonaws.com

About

Source code for Maxfacts.uk – Information on all aspects of oral and maxillofacial surgery for patients, carers and professionals

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •