Skip to content

lunaticmonk/stato-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

❯❯❯ Stato-API

Simply work.

Stato is a minimal tool to increase your productivity and work without getting disturbed in offices or even in remote teams.

This is the repository of API which serves stato-electron

Tech

Stato uses a number of open source projects to work properly:

  • Node.js - Evented I/O for the backend
  • Express - a Node.js web application framework
  • Bookshelf - JavaScript ORM for Node.js
  • Knex - SQL query builder
  • PostgreSQL - Object relational database to hold the data

Desktop app

Stato API serves the desktop app. Head over here.

Installation

Stato requires Node.js v8+ to run.

Development

Want to contribute? Great!

$ git clone [email protected]:lunaticmonk/stato-api.git
$ cd stato-api
$ npm install

But, before that, you will have to ensure that PostgreSQL is installed on your system.

  • Install PostgreSQL on your system(Follow any tutorial for installing it, quite simple thing).
  • Create a database user or use the default one i.e postgresql(Make sure to change the configs in .env once you create new user).
  • Once that is done, run createdb statodev from your terminal.

After that, run the migrations with knex.

$ knex migrate:latest --knexfile ./src/knexfile.js

Create a .env and add following environment variables to it.

DATABASE_USER=DATABASE_USER
DATABASE_PASSWORD=DATABASE_PASSWORD
DATABASE_NAME=DATABASE_NAME
NODE_ENV=NODE_ENV
ALLOWED_DOMAINS=*

Finally, run

$ npm run start

To launch stato-api on your own server(prod use)

$ npm install pm2 -g
$ npm run daemon

Todos

  • Suggest more features
  • Write Tests

Please ⭐ this repository if you liked it.

License

MIT

Releases

No releases published

Packages

No packages published