or, shawrty
A dead simple URL shortener web app. Running here.
I adapted the styles of Exun's old link shortener (exun.co) for the user dashboard and the .authorized file to enable multi-user access to the app.
This project is written in TypeScript using Express, EJS and Prisma.
- Clone the repo and install dependencies.
git clone https://github.com/pseudocodenerd/mdvsh.co
cd mdvsh.co
npm install-
Rename
.env.sampleto.envand fill appropriately. -
Create a
.authorizedfiled with emails of users allowed to access the web-app on new lines. -
Obtaining Google Cloud Credentials for OAuth.
- Add an API to your google developer's console (preferably
Google+ API). - Configure an OAuth consent screen with the correct details.
- Create a client id with correct Authorised Redirect URIs, here:
http://localhost:3000/shawrty/auth(dev)https://<your-domain>.com/shawrty/auth(production)
- Download the
client_secret.jsonfile from your console and place it in the root of the directory.
- Add an API to your google developer's console (preferably
-
Run the following command to instantiate the PrismaClient.
npx prisma generate- . . and you're done.
npm run start
$ > [email protected] dev
$ > ts-node src/app.ts
$ 🚀 Server ready at: http://localhost:3000