change database name
This commit is contained in:
@@ -7,15 +7,19 @@ Integrate and customize CRM and ERP used by SimaSpace
|
||||
1. Run setup script : `npm run setup`
|
||||
This installs packages for server and client applications.
|
||||
Then builds docker image for database and starts container.
|
||||
Database name is `psychology`. Default username is `docker` and default password is `docker`.
|
||||
Database name is `CrmIntegration`. Default username is `docker` and default password is `docker`.
|
||||
|
||||
NOTE : If migration fails, try executing migrations manually with `npm run migrate`
|
||||
|
||||
If everything works correctly, it is possible to connect to database with :
|
||||
`psql -d psychology -p 5432 -U docker -h localhost`
|
||||
`psql -d CrmIntegration -p 5432 -U docker -h localhost`
|
||||
|
||||
3. Start server : `npm run start-server`
|
||||
|
||||
4. Start client : `npm run start-client`
|
||||
|
||||
Open app on http://localhost:3000
|
||||
|
||||
#### Useful NPM scripts
|
||||
|
||||
There are few scripts to handle some operations faster, without copy-pasting commands to terminal
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"development": {
|
||||
"username": "docker",
|
||||
"password": "docker",
|
||||
"database": "psychology",
|
||||
"database": "CrmIntegration",
|
||||
"port": "5432",
|
||||
"dialect": "postgres"
|
||||
},
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"install-server": "npm install",
|
||||
"install-client": "cd client && yarn install",
|
||||
"docker-build": "docker build -t psychology .",
|
||||
"docker-start": "docker run -e POSTGRES_USER=docker -e POSTGRES_PASSWORD=docker -e POSTGRES_DB=psychology --name pg_psychology -d -p 5432:5432 psychology",
|
||||
"docker-stop": "docker stop pg_psychology",
|
||||
"setup": "npm run install-server && npm run install-client && npm run docker-build && npm run docker-start && npm run migrate",
|
||||
"docker-build": "docker build -t simaspace .",
|
||||
"docker-start": "docker run -e POSTGRES_USER=docker -e POSTGRES_PASSWORD=docker -e POSTGRES_DB=CrmIntegration --name pg_simaspace -d -p 5432:5432 simaspace",
|
||||
"docker-stop": "docker stop pg_simaspace",
|
||||
"setup": "npm run install-server && npm run install-client && npm run docker-build && npm run docker-start && sleep 2 && npm run migrate",
|
||||
"migrate": "npx sequelize db:migrate",
|
||||
"start-server": "nodemon server.js",
|
||||
"start-client": "cd client && yarn start",
|
||||
|
||||
Reference in New Issue
Block a user