Giter VIP home page Giter VIP logo

yawc's Introduction

YAWC (Yet Another Web Chat)

Configuration

You need to set a few environment variables for the process.

For development, you can simply create a ``.env`** file, containing a few variables like this:

PYTHONPATH=.
SECRET_KEY=notasecret
DATABASE_URL=postgres://postgres:@localhost:5432/yawc
REDIS_URL=redis://localhost:6379

Note: I'm not 100% sure why pipenv isn't setting up the ``PYTHONPATH`** correctly, but it appears that setting it manually is required.

Important: make sure you set SECRET_KEY to something actually secret in production. I usually run pwgen -s 40 1 to generate random secret keys.

Development

Install Python dependencies:

pipenv install

Install Nodejs dependencies:

cd web
yarn install

Run services (PostgreSQL, Redis) via Docker:

docker-compose up

Run database migrations:

pipenv run alembic upgrade head

Start API server:

pipenv run gunicorn -k flask_sockets.worker yawc.app_dev:app --reload --bind localhost:5000

Start frontend server:

cd web
API_URL=http://localhost:5000/graphql yarn start

Access the application by visiting http://localhost:8000

Note: head to http://localhost:8000/login to log in. There currently is no redirect in place for non-authenticated users.

User management

To create a new user:

pipenv run python -m yawc user create '[email protected]'

To list users:

pipenv run python -m yawc user list

To change user password (for user #1 in this case):

pipenv run python -m yawc user set-password 1

yawc's People

Contributors

rshk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.