|
1 | | -# node-api-jwt-sequelize-boilerplate |
2 | | - Node.js API boilerplate with authentication for your next project |
| 1 | +# Node.js API boilerplate with JWT and Sequelize |
| 2 | + |
| 3 | +[![Contributors][contributors-shield]][contributors-url] |
| 4 | +[![Forks][forks-shield]][forks-url] |
| 5 | +[![Stargazers][stars-shield]][stars-url] |
| 6 | +[![Issues][issues-shield]][issues-url] |
| 7 | +[![MIT License][license-shield]][license-url] |
| 8 | + |
| 9 | +Node.js REST API boilerplate with authentication for your next project. |
| 10 | + |
| 11 | +[Report bug][issues-url] · [Request feature][issues-url] |
| 12 | + |
| 13 | +<!-- PROJECT SHIELDS --> |
| 14 | +<!-- |
| 15 | +*** I'm using markdown "reference style" links for readability. |
| 16 | +*** Reference links are enclosed in brackets [ ] instead of parentheses ( ). |
| 17 | +*** See the bottom of this document for the declaration of the reference variables |
| 18 | +*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use. |
| 19 | +*** https://www.markdownguide.org/basic-syntax/#reference-style-links |
| 20 | +--> |
| 21 | + |
| 22 | +<!-- TABLE OF CONTENTS --> |
| 23 | + |
| 24 | +## Table of contents |
| 25 | + |
| 26 | +<details open="open"> |
| 27 | + <summary>Table of Contents</summary> |
| 28 | + <ol> |
| 29 | + <li> |
| 30 | + <a href="#about">About</a> |
| 31 | + <ul> |
| 32 | + <li><a href="#built-with">Built With</a></li> |
| 33 | + </ul> |
| 34 | + </li> |
| 35 | + <li> |
| 36 | + <a href="#getting-started">Getting Started</a> |
| 37 | + <ul> |
| 38 | + <li><a href="#prerequisites">Prerequisites</a></li> |
| 39 | + <li><a href="#installation">Installation</a></li> |
| 40 | + </ul> |
| 41 | + </li> |
| 42 | + <li><a href="#usage">Usage</a></li> |
| 43 | + <li><a href="#roadmap">Roadmap</a></li> |
| 44 | + <li><a href="#contributing">Contributing</a></li> |
| 45 | + <li><a href="#license">License</a></li> |
| 46 | + <li><a href="#contact">Contact</a></li> |
| 47 | + <li><a href="#acknowledgements">Acknowledgements</a></li> |
| 48 | + </ol> |
| 49 | +</details> |
| 50 | + |
| 51 | +<!-- ABOUT THE PROJECT --> |
| 52 | + |
| 53 | +## About |
| 54 | + |
| 55 | +I needed an API boilerplate to kickstart my projects. I built this repo for me to be able to use it as a template when I need to create an API for a personal project. |
| 56 | + |
| 57 | +Features included : |
| 58 | + |
| 59 | +- Authentication through JWT (`access_token` and `refresh_token`) |
| 60 | +- Sequelize CLI to create additional tables |
| 61 | + |
| 62 | +### Built With |
| 63 | + |
| 64 | +- [Express](https://expressjs.com) |
| 65 | +- [Node.js](https://nodejs.org/en/) |
| 66 | +- [Sequelize](https://sequelize.org/master/) |
| 67 | +- [Sequelize CLI](https://github.com/sequelize/cli) |
| 68 | + |
| 69 | +<!-- GETTING STARTED --> |
| 70 | + |
| 71 | +## Getting Started |
| 72 | + |
| 73 | +This is an example of how you may give instructions on setting up your project locally. |
| 74 | +To get a local copy up and running follow these simple example steps. |
| 75 | + |
| 76 | +### Prerequisites |
| 77 | + |
| 78 | +- npm |
| 79 | +- Node.js |
| 80 | +- Database working with Sequelize (postgres, mysql, mariadb, sqlite3 or tedious) |
| 81 | + |
| 82 | +### Installation |
| 83 | + |
| 84 | +1. Clone the repo |
| 85 | + |
| 86 | + ```sh |
| 87 | + git clone https://github.com/jeremyhalin/node-api-jwt-sequelize-boilerplate.git |
| 88 | + ``` |
| 89 | + |
| 90 | +2. Install NPM packages |
| 91 | + |
| 92 | + ```sh |
| 93 | + npm install |
| 94 | + ``` |
| 95 | + |
| 96 | +3. Create `.env` file |
| 97 | + |
| 98 | + ```sh |
| 99 | + cp .env.example .env |
| 100 | + ``` |
| 101 | + |
| 102 | +<!-- USAGE EXAMPLES --> |
| 103 | + |
| 104 | +## Usage |
| 105 | + |
| 106 | +1. Start your database |
| 107 | + |
| 108 | +2. Start server |
| 109 | + |
| 110 | + ```sh |
| 111 | + npm start |
| 112 | + ``` |
| 113 | + |
| 114 | +<!-- _For more examples, please refer to the [Documentation](https://example.com)_ --> |
| 115 | + |
| 116 | +<!-- ROADMAP --> |
| 117 | + |
| 118 | +## Roadmap |
| 119 | + |
| 120 | +See the [open issues][issues-url] for a list of proposed features (and known issues). |
| 121 | + |
| 122 | +<!-- CONTRIBUTING --> |
| 123 | + |
| 124 | +## Contributing |
| 125 | + |
| 126 | +Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**. |
| 127 | + |
| 128 | +1. Fork the Project |
| 129 | +2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) |
| 130 | +3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) |
| 131 | +4. Push to the Branch (`git push origin feature/AmazingFeature`) |
| 132 | +5. Open a Pull Request |
| 133 | + |
| 134 | +<!-- LICENSE --> |
| 135 | + |
| 136 | +## License |
| 137 | + |
| 138 | +Distributed under the MIT License. See `LICENSE` for more information. |
| 139 | + |
| 140 | +<!-- ACKNOWLEDGEMENTS --> |
| 141 | + |
| 142 | +## Acknowledgements |
| 143 | + |
| 144 | +- [Img Shields](https://shields.io) |
| 145 | +- [Choose an Open Source License](https://choosealicense.com) |
| 146 | +- [gitmoji](https://github.com/carloscuesta/gitmoji) |
| 147 | +- [Best-README-Template](https://github.com/othneildrew/Best-README-Template) |
| 148 | +- [nodemon](https://www.npmjs.com/package/nodemon) |
| 149 | +- [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) |
| 150 | +- [http-status-codes](https://github.com/prettymuchbryce/http-status-codes) |
| 151 | +- [Best-README-Template](https://github.com/othneildrew/Best-README-Template) |
| 152 | + |
| 153 | +<!-- MARKDOWN LINKS & IMAGES --> |
| 154 | +<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --> |
| 155 | + |
| 156 | +[contributors-shield]: https://img.shields.io/github/contributors/othneildrew/Best-README-Template.svg?style=flat |
| 157 | +[contributors-url]: https://github.com/jeremyhalin/node-api-jwt-sequelize-boilerplate/graphs/contributors |
| 158 | +[forks-shield]: https://img.shields.io/github/forks/jeremyhalin/node-api-jwt-sequelize-boilerplate.svg?style=flat |
| 159 | +[forks-url]: https://github.com/jeremyhalin/node-api-jwt-sequelize-boilerplate/network/members |
| 160 | +[stars-shield]: https://img.shields.io/github/stars/jeremyhalin/node-api-jwt-sequelize-boilerplate.svg?style=flat |
| 161 | +[stars-url]: https://github.com/jeremyhalin/node-api-jwt-sequelize-boilerplate/stargazers |
| 162 | +[issues-shield]: https://img.shields.io/github/issues/jeremyhalin/node-api-jwt-sequelize-boilerplate.svg?style=flat |
| 163 | +[issues-url]: https://github.com/jeremyhalin/node-api-jwt-sequelize-boilerplate/issues |
| 164 | +[license-shield]: https://img.shields.io/github/license/jeremyhalin/node-api-jwt-sequelize-boilerplate.svg?style=flat |
| 165 | +[license-url]: https://github.com/jeremyhalin/node-api-jwt-sequelize-boilerplate/blob/master/LICENSE.txt |
| 166 | +[product-screenshot]: images/screenshot.png |
| 167 | +[issues-url]: https://github.com/jeremyhalin/node-api-jwt-sequelize-boilerplate/issues |
0 commit comments