Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
andreacw5 committed Jan 29, 2023
1 parent 6b62ddc commit 52432c6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 45 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Andrea Tombolato
Copyright (c) 2023 Andrea Tombolato

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
81 changes: 38 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,42 @@
# Url Manager App
Url manager system with Rest API for management of short urls, click statistics and redirects by personalized codes
# Short URL Generator

## Description
This application allows users to create short, personalized URLs using Nest.js.

## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Clone the repository to your local machine: `git clone https://github.com/andreacw5/short-url-generator.git`
- Install dependencies: `yarn install`
- Start the application: `yarn start:dev`
- Visit `http://localhost:3000` in your browser to use the application.

## Features
- Create short urls
- Edit short urls
- Delete short urls
- Redirect to default url if code is not found
- Click recording for short urls
- Dockerized application
- GitHub actions for build
- API Auth token for CUD endpoints

## Next planned functionality
- More detailed statistics for short urls
- Metrics for short urls
- Github actions for build
- Deployment with frontend management page

## Built With
- [Nest.js](https://nestjs.com/) - A progressive Node.js framework for building efficient, reliable and scalable server-side applications.
- [TypeORM](https://typeorm.io/#/) - ORM for TypeScript and JavaScript (ES7, ES6, ES5).

## Requirements
* [Node.js](https://nodejs.org/en/download/) 12.14.0 or higher
* [Yarn](https://yarnpkg.com/en/) 1.10.1 or higher
* [PostgreSQL](https://www.postgresql.org/download/) 14.x or higher
* Configuration file `.env` (see `.env.sample`)
- [Node.js](https://nodejs.org/en/download/) 18.10.0 or higher
- [Yarn](https://yarnpkg.com/en/) 1.10.1 or higher

## Authentication for management
The authentication is based on single static token, stored on env `API_KEY` variable.
Request for create/edit/delete urls need `X-API-KEY` header with the value of `API_KEY`.

## Running environment
## Environment Variables
| code | description | default value |
|----------------------|-----------------------------------------------|--------------------|
| DATABASE_HOST | database url | localhost |
Expand All @@ -25,39 +48,11 @@ Url manager system with Rest API for management of short urls, click statistics
| DEFAULT_URL_CODE | default code for redirect for click recording | code |
| API_KEY | auth token for CUD Endpoints | 2342358 |

## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/andreacw5/url-manager-app/releases).

## Installation
```bash
$ npm install
```

## Running the app
```bash
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod
```

## Test
```bash
# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov
```

## Authentication for management
The authentication is based on single static token, stored on env `API_KEY` variable.
Request for create/edit/delete urls need `X-API-KEY` header with the value of `API_KEY`.
## Author
- [Andrea Tombolato](https://andreacw.dev)

## Stay in touch
- Author - [Andrea Tombolato](https://andreacw.dev)
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
1 change: 0 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ async function bootstrap() {
host: configService.get('database.host'),
port: configService.get('database.port'),
username: configService.get('database.username'),
password: configService.get('database.password'),
name: configService.get('database.name'),
},
defaults: {
Expand Down

0 comments on commit 52432c6

Please sign in to comment.