|
1 | | -# api |
| 1 | +[![Contributors][contributors-shield]][contributors-url] |
| 2 | +[![Forks][forks-shield]][forks-url] |
| 3 | +[![Stargazers][stars-shield]][stars-url] |
| 4 | +[![Issues][issues-shield]][issues-url] |
| 5 | +[![MIT License][license-shield]][license-url] |
| 6 | +[![LinkedIn][linkedin-shield]][linkedin-url] |
2 | 7 |
|
3 | | -git clone |
| 8 | + |
| 9 | + |
| 10 | +<!-- PROJECT LOGO --> |
| 11 | +<br /> |
| 12 | +<p align="center"> |
| 13 | + <a href="https://github.com/reddimohan/loopback4-authentication-jwt-roles"> |
| 14 | + </a> |
| 15 | + |
| 16 | + <h3 align="center">Loopback 4 JWT Authentication with Roles</h3> |
| 17 | + |
| 18 | + <p align="center"> |
| 19 | + Loopback 4 Boilerplate code for quick implimentation of Authentication and Roles based on JWT. |
| 20 | + <br /> |
| 21 | + <br /> |
| 22 | + <a href="https://github.com/reddimohan/loopback4-authentication-jwt-roles">View Demo</a> |
| 23 | + · |
| 24 | + <a href="https://github.com/reddimohan/loopback4-authentication-jwt-roles/issues">Report Bug</a> |
| 25 | + </p> |
| 26 | +</p> |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +<!-- TABLE OF CONTENTS --> |
| 31 | +## Table of Contents |
| 32 | + |
| 33 | +* [About the Project](#about-the-project) |
| 34 | + * [Built With](#built-with) |
| 35 | +* [Getting Started](#getting-started) |
| 36 | + * [Prerequisites](#prerequisites) |
| 37 | + * [Installation](#installation) |
| 38 | +* [Roadmap](#roadmap) |
| 39 | +* [Contributing](#contributing) |
| 40 | +* [License](#license) |
| 41 | +* [Contact](#contact) |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +<!-- ABOUT THE PROJECT --> |
| 46 | +## About The Project |
| 47 | + |
| 48 | +[![https://reddimohan.github.io][product-screenshot-1]]() |
| 49 | +### API Docs |
| 50 | +[![https://reddimohan.github.io][product-screenshot-2]]() |
| 51 | + |
| 52 | +### Built With |
| 53 | + |
| 54 | +* [Loopback 4](https://loopback.io/doc/en/lb4) |
| 55 | +* [MySQL](https://www.mysql.com) |
| 56 | +* [jwt](https://jwt.io) |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | +<!-- GETTING STARTED --> |
| 61 | +## Getting Started |
| 62 | + |
| 63 | +To get a local copy up and running follow these simple steps. |
| 64 | + |
| 65 | +### Prerequisites |
| 66 | + |
| 67 | +This is an example of how to list things you need to use the software and how to install them. |
| 68 | +* node.js, npm |
| 69 | + |
| 70 | +```sh |
| 71 | +npm install npm@latest -g |
| 72 | +``` |
| 73 | + |
| 74 | +### Installation |
| 75 | + |
| 76 | +1. Clone the repo |
| 77 | +```sh |
| 78 | +git clone https://github.com/reddimohan/loopback4-authentication-jwt-roles.git |
| 79 | +``` |
| 80 | +2. Install NPM packages |
| 81 | +```sh |
4 | 82 | npm install |
5 | | -update db details in src/datasources/mysql.datasource.config.json |
| 83 | +``` |
| 84 | +3. Create a database (MySQL) |
| 85 | +4. Update database details in src/datasources/mysql.datasource.config.json file |
| 86 | +```sh |
| 87 | +{ |
| 88 | + "name": "mysql", |
| 89 | + "connector": "mysql", |
| 90 | + "url": "", |
| 91 | + "host": "localhost", |
| 92 | + "port": 3306, |
| 93 | + "user": "<username>", |
| 94 | + "password": "<password>", |
| 95 | + "database": "<db_name>" |
| 96 | +} |
| 97 | +``` |
| 98 | +5. Migrade database schema |
| 99 | +```sh |
6 | 100 | npm run build |
7 | 101 | num run migrate |
| 102 | +``` |
| 103 | +6. Start the application |
| 104 | +```sh |
| 105 | +npm start |
| 106 | +``` |
| 107 | +7. Install Loopback 4 CLI - This will be useful when you want to start developing on top this repo |
| 108 | +```sh |
| 109 | +npm install -g @loopback/cli |
| 110 | +``` |
| 111 | + |
| 112 | + |
| 113 | +<!-- ROADMAP --> |
| 114 | +## Roadmap |
| 115 | + |
| 116 | +See the [open issues](https://github.com/reddimohan/loopback4-authentication-jwt-roles/issues) for a list of proposed features (and known issues). |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | +<!-- CONTRIBUTING --> |
| 121 | +## Contributing |
| 122 | + |
| 123 | +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**. |
| 124 | + |
| 125 | +1. Fork the Project |
| 126 | +2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) |
| 127 | +3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) |
| 128 | +4. Push to the Branch (`git push origin feature/AmazingFeature`) |
| 129 | +5. Open a Pull Request |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | +<!-- LICENSE --> |
| 134 | +## License |
| 135 | + |
| 136 | +Distributed under the MIT License. See `LICENSE` for more information. |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | +<!-- CONTACT --> |
| 141 | +## Contact |
| 142 | + |
| 143 | +Mohan - [LinkedIn](https://linkedin.com/in/reddimohan) - [Twitter](https://twitter.com/reddimohan) |
| 144 | + |
| 145 | +Project Link: [https://github.com/reddimohan/loopback4-authentication-jwt-roles](https://github.com/reddimohan/loopback4-authentication-jwt-roles) |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
8 | 152 |
|
9 | | -[-@2x.png)](http://loopback.io/) |
10 | | -# loopback4-authentication-jwt-roles |
| 153 | +<!-- MARKDOWN LINKS & IMAGES --> |
| 154 | +<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --> |
| 155 | +[contributors-shield]: https://img.shields.io/github/contributors/reddimohan/loopback4-authentication-jwt-roles.svg?style=flat-square |
| 156 | +[contributors-url]: https://github.com/reddimohan/loopback4-authentication-jwt-roles/graphs/contributors |
| 157 | +[forks-shield]: https://img.shields.io/github/forks/reddimohan/loopback4-authentication-jwt-roles.svg?style=flat-square |
| 158 | +[forks-url]: https://github.com/reddimohan/loopback4-authentication-jwt-roles/network/members |
| 159 | +[stars-shield]: https://img.shields.io/github/stars/reddimohan/loopback4-authentication-jwt-roles.svg?style=flat-square |
| 160 | +[stars-url]: https://github.com/reddimohan/loopback4-authentication-jwt-roles/stargazers |
| 161 | +[issues-shield]: https://img.shields.io/github/issues/reddimohan/loopback4-authentication-jwt-roles.svg?style=flat-square |
| 162 | +[issues-url]: https://github.com/reddimohan/loopback4-authentication-jwt-roles/issues |
| 163 | +[license-shield]: https://img.shields.io/github/license/reddimohan/loopback4-authentication-jwt-roles.svg?style=flat-square |
| 164 | +[license-url]: https://github.com/reddimohan/loopback4-authentication-jwt-roles/blob/master/LICENSE |
| 165 | +[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=555 |
| 166 | +[linkedin-url]: https://linkedin.com/in/reddimohan |
| 167 | +[product-screenshot-1]: images/home.png |
| 168 | +[product-screenshot-2]: images/api_docs.png |
0 commit comments