lil is a URL shortening service built with the promise of never saving any user-data. It uses random captcha's to validate users and a username of the user's choice to do user sessions.
An instance of it can be found over at one0.xyz.
- I thought sqlite3 and sequelize looked cool, so I tried building a project with them.
- The codebase is a joke. Seriously! it's toxic. I'm planning to do a revamp in the coming days. But don't let that stop you from taking a hammer to the code.
- There is also a big TODO section, that I'm too ashamed to publish. The only reason why I published this, is so that I can feel good about myself for building a project in 2 days.
- Oh! You're still here? Wow! thank you ... read on.
- Sqlite3
- Nodejs
- Vue.js (I tried doing this with vanilla JS. but it made everything even more worse.)
$ node_modules/.bin/sequelize init
# update config/config.json
$ node_modules/.bin/sequelize model:generate --name User --attributes email:string,status:string,gateCode:string
$ node_modules/.bin/sequelize model:generate --name Url --attributes destination:string,short:string,status:string
$ node_modules/.bin/sequelize db:migrate
$ node_modules/.bin/sequelize seed:generate --name seed-user
$ node_modules/.bin/sequelize seed:generate --name seed-url
$ node_modules/.bin/sequelize db:seed:all
$ git clone https://github.com/aktsbot/lil ./lil
$ cd lil
$ npm install
$ node_modules/.bin/sequelize db:migrate
$ npm start # for development
$ # OR
$ NODE_ENV="production" node_modules/.bin/sequelize db:migrate
$ JWT_SECRET="mw4h4h4" NODE_ENV="production" npm start # for production