Update README

This commit is contained in:
Jim Moffet
2022-08-01 11:14:37 -07:00
committed by GitHub
parent f526ed190b
commit 314eb27f5a

View File

@@ -1,72 +1,40 @@
# notifications-admin # US Notify Admin
GOV.UK Notify admin application - https://www.notifications.service.gov.uk/ Cloned from the brilliant work of the team at [GOV.UK Notify](https://github.com/alphagov/notifications-admin), cheers!
US Notify admin application - https://notifications-admin.app.cloud.gov (contact team for access)
- Register and manage users - Register and manage users
- Create and manage services - Create and manage services
- Send batch emails and SMS by uploading a CSV - Send batch emails and SMS by uploading a CSV
- Show history of notifications - Show history of notifications
## Setting up ## QUICK START
### Python version NOTE: Set up the [notifications-api repo](https://github.com/18F/notifications-api) locally first, you'll need that docker network and a functioning api to make use of this repo.
At the moment we run Python 3.9 in production.
### NodeJS & NPM
If you don't have NodeJS on your system, install it with homebrew.
```shell
brew install node
``` ```
# create .env file as instructed below
`nvm` is a tool for managing different versions of NodeJS. Follow [the guidance on nvm's github repository](https://github.com/nvm-sh/nvm#installing-and-updating) to install it. # download vscode and install the Remote-Containers plug-in from Microsoft
Once installed, run the following to switch to the version of NodeJS for this project. If you don't # make sure your docker daemon is running
have that version, it should tell you how to install it.
```shell # Using the command pallette (cmd+p), search "Remote Containers: Open folder in project"
nvm use # choose devcontainer-admin folder, after reload, hit "show logs" in bottom-right
``` # logs should complete shortly after running gulp.js and compiling front-end files
### `environment.sh` # Check vscode panel > ports, await green dot, open a new terminal and run the web server
In the root directory of the application, run:
```
echo "
export NOTIFY_ENVIRONMENT='development'
export FLASK_APP=application.py
export FLASK_ENV=development
export WERKZEUG_DEBUG_PIN=off
"> environment.sh
```
### AWS credentials
To run parts of the app, such as uploading letters, you will need appropriate AWS credentials. See the [Wiki](https://github.com/alphagov/notifications-manuals/wiki/aws-accounts#how-to-set-up-local-development) for more details.
## To run the application
```shell
# install dependencies, etc.
make bootstrap
# run the web app
make run-flask make run-flask
``` ```
Then visit [localhost:6012](http://localhost:6012). Visit [localhost:6012](http://localhost:6012)
Any Python code changes you make should be picked up automatically in development. If you're developing JavaScript code, run `npm run watch` to achieve the same. NOTE: any .py code changes you make should be picked up automatically in development. If you're developing JavaScript code, open another vscode terminal and run `npm run watch` to achieve the same.
## To test the application ## To test the application
From a terminal within the running devcontainer:
``` ```
# install dependencies, etc.
make bootstrap
# run all the tests # run all the tests
make test make test
@@ -76,7 +44,7 @@ npm run test-watch
To run a specific JavaScript test, you'll need to copy the full command from `package.json`. To run a specific JavaScript test, you'll need to copy the full command from `package.json`.
## Further docs ## Further docs [STILL UK DOCS]
- [Working with static assets](docs/static-assets.md) - [Working with static assets](docs/static-assets.md)
- [JavaScript documentation](https://github.com/alphagov/notifications-manuals/wiki/JavaScript-Documentation) - [JavaScript documentation](https://github.com/alphagov/notifications-manuals/wiki/JavaScript-Documentation)