๐ A system that allows efficient, cost-effective management of our library.
Kindly ensure you install the following softwares
In order to get a copy of the project up and running on your local computer for development and testing purposes. Do the following
- Clone the repo.
- Switch to project directory
- Create a local
.env
file using the.env.sample
file on the root folder - Type
npm install
to install dependencies - Type
npm run dev
to start development server ornpm start
to run in production
In other to run migrations, run
npx knex migrate:latest
OR npm run migrate
To create a new migration, run
npx knex migrate:make <tablename>
OR npm run make:migration <tablename>
To rollback a migration, run
npx knex migrate:rollback <tablename>
OR npm run migrate:rollback <tablename>
To certify that the server is operational navigate to http://localhost:5000 on your browser and you should see the message.
{ message: 'Hello Books Deferral' }
To send email within the application using SMTP (mailtrap.io)
- Update your local
.env
file with the followingMAIL_USERNAME=YOUR_MAILTRAP_USERNAME
MAIL_PASSWORD=YOUR_MAILTRAP_PASSWORD
- Import
Mail
class fromfriendly-mail
- Create an instance of
new Mail('Example')
Note: Mail
is a chainable class
example:
const sampleMail = new Mail('Email Verification');
sampleMail.to('[email protected]')
.subject('some message')
.send() // returns a promise