https://github.com/csantiago132/node-address-book
A CLI application that will allow you to store and retrieve contacts from an address book thru Node.js
https://github.com/csantiago132/node-address-book
cli javascript nodejs postgresql sequelizejs
Last synced: 2 months ago
JSON representation
A CLI application that will allow you to store and retrieve contacts from an address book thru Node.js
- Host: GitHub
- URL: https://github.com/csantiago132/node-address-book
- Owner: csantiago132
- License: mit
- Created: 2018-10-03T17:38:14.000Z (over 6 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-04T00:13:37.000Z (over 2 years ago)
- Last Synced: 2025-02-12T14:15:09.042Z (4 months ago)
- Topics: cli, javascript, nodejs, postgresql, sequelizejs
- Language: JavaScript
- Homepage:
- Size: 593 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://app.codacy.com/app/csantiago132/node-address-book?utm_source=github.com&utm_medium=referral&utm_content=csantiago132/node-address-book&utm_campaign=Badge_Grade_Dashboard)
[](https://github.com/prettier/prettier)
[](https://circleci.com/gh/csantiago132/node-address-book)# Node Address Book
A CLI application that will allow you to store and retrieve contacts from an
address book thru Node.js using Sequelize on a PostgreSQL database.## Prerequisites
> - PostgreSQL
> - Yarn >= 1.5.x
> - Node >=10.x## Getting Started
These instructions will get you a copy of the project up and running on your
local machine for development and testing purposes.1. Clone this repo using
`git clone https://github.com/csantiago132/node-address-book.git`2. Move to the appropriate directory: `cd node-address-book`
3. Run `yarn install` to install dependencies
4. If you don't have Postgres installed on your computer, please
[download](https://www.openscg.com/bigsql/postgresql/installers.jsp/) and
install using the installer for your operating system5. Create the databases for the application by running the `createdb` command:
- A database to use in the application
- a database for testing the application```bash
createdb -U postgress -w addressBook
createdb -U postgress -w addressBookTest
```6. start your database by running the following command:
`pg_ctl -D /usr/local/var/postgres[VERSION NUMBER HERE] start`- If your postgres folder does not have a version number, run
`pg_ctl -D /usr/local/var/postgres start`7. On the terminal, note the port number where Postgres listens for requests
- Go to `db/config/config.json` and place that number in the `port` property:
```json
"development": {
"port": "YOUR_PORT_NUMBER_HERE",
```- **Value has to be a Number, not a String**
8. Run the migration scripts `yarn run migrateDb` on the terminal
- this will run `sequelize db:migrate && sequelize db:migrate --env test`
**Your database is now ready to accept contacts**
## Features
- [x] CircleCI integration
- [x] Jazmine test environment
- [x] Husky pre-commit hooks (to lint and format the code)
- [x] Add new contacts to the database
- [x] View all contacts stored on the database
- [x] Search for contacts stored on the database
- [x] Gets you current date and time## TODO List
In the near future, I want to add:
- [ ] Increase and refactor tests suites
- [ ] Add coverage reports thru Coveralls
- [ ] Build a front-end and create an UI for the application## Built With
- [NodeJS](https://github.com/nodejs/node)
- [node-postgres](https://github.com/brianc/node-postgres)
- [inquirer](https://github.com/SBoudrias/Inquirer.js/)
- [pg-hstore](https://github.com/scarney81/pg-hstore)
- [Sequelize](https://github.com/sequelize/sequelize#readme)
- [PostgreSQL](https://www.openscg.com/bigsql/postgresql/installers.jsp/)## Versioning
I use [SemVer](http://semver.org/) for versioning. For the versions available,
see the
[tags on this repository](https://github.com/csantiago132/node-address-book/releases).## Authors
- **Carlos Santiago** - _Initial work_ -
[csantiago132](https://github.com/csantiago132)## License
This project is licensed under the MIT License - see the
[LICENSE.md](LICENSE.md) file for details.## Acknowledgments
- **Cory Trimm** - _for mentoring_ - [github](https://github.com/ctrimm)