Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

License

NotificationsYou must be signed in to change notification settings

fwextensions/bats-server

 
 

Repository files navigation

Docker-based Development Setup

  1. Download and install Docker for your platform

  2. Clone this repo, copy the example.env file to .env and fill in empty variables, if any.

  3. Run:

    docker-compose up

    Wait a while for container images to download/build, then when everything is upand running, you can view the site in your browser:

    http://localhost:3000/

  4. To log in to the running server container:

    docker-compose exec server bash -l

    After you log in, you can create your database by running:

    sequelize db:create

    Execute any pending database migrations by running:

    sequelize db:migrate

    Seed the database with hospitals and test users by running:

    sequelize db:seed:all

    The test users include (email/password):

    batsadmin@c4sf.me/abcd1234 (a Superuser)

    op.healthcare@c4sf.me/abcd1234 (an operational Healthcare user)

    op.ems@c4sf.me/abcd1234 (an operational EMS user)

    If you wish to inspect the db, you can run:

    psql $DATABASE_URL

    You can also run the script commands set up by Create React App after logging in.

Server Testing

  1. Log in to a running server container as above.

  2. Make sure the test database is created, and run migrations on it:

    sequelize db:create --env testsequelize db:migrate --env test

    During development, you may be working on migrations and you will need to undo and rerunmigrations- make sure to do that on the test database as well.

    sequelize db:migrate:undo --env testsequelize db:migrate --env test
  3. Run the server tests:

    yarn test:server

License

Bed Availability Transport Study ServerCopyright (C) 2021 Code for San Francisco

This program is free software: you can redistribute it and/or modifyit under the terms of the GNU Affero General Public License aspublished by the Free Software Foundation, either version 3 of theLicense, or (at your option) any later version.

This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public Licensealong with this program. If not, seehttps://www.gnu.org/licenses/.

Create React App

This project was bootstrapped withCreate React App.

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Openhttp://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.
See the section aboutrunning tests for more information.

yarn build

Builds the app for production to thebuild folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section aboutdeployment for more information.

yarn eject

Note: this is a one-way operation. Once youeject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you caneject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands excepteject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever useeject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Learn More

You can learn more in theCreate React App documentation.

To learn React, check out theReact documentation.

Code Splitting

This section has moved here:https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here:https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here:https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here:https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here:https://facebook.github.io/create-react-app/docs/deployment

yarn build fails to minify

This section has moved here:https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript83.5%
  • SCSS15.2%
  • HTML0.5%
  • EJS0.5%
  • Dockerfile0.2%
  • Shell0.1%

[8]ページ先頭

©2009-2025 Movatter.jp