Install Demo database
As we said before, Yogosell comes with an empty database and a demo database. So far, we have worked with the empty database. We will now replace it with the demo database.
Node.js
Stop Yogosell Server with a CNTRL C. Then open .env.js with your favorite editor and replace the following line:
const env = {
// Define here the credentials to access your database. This hidden file
// is declared not to be exported in '.gitignore'.
db: {
active: 'sqlite',
sqlite: {
database: './db/db.sqlite', // <------------- replace db.sqlite by demo.sqlite
testdb: 'the path to sqlite test database',
},
...
},
};
and restart the server.
Docker
Stop Yogosell Server (we assume you know how to manage Docker). Then, open app/.env.js and modify the following line:
const env = {
// Define here the credentials to access your database. This hidden file
// is declared not to be exported in '.gitignore'.
db: {
active: 'sqlite',
sqlite: {
database: '../db/db.sqlite', // <------------- replace db.sqlite by demo.sqlite
testdb: 'the path to sqlite test database',
},
...
},
};
Build a new image:
docker build -t yogosell-demo-nodejs .
And create and start a new container:
docker run -d -p 8080:1080 -v $PWD/db:/usr/src/db --name my-yogosell-demo-nodejs yogosell-demo-nodejs
-- oOo ---