GithubHelp home page GithubHelp logo

accounts-server's Introduction

AccountsApp

AccountsApp fullstack GraphQL app with React and Node.js.

Features

  • Scalable GraphQL server: The server uses apollo-server-express which is based on Apollo Server & Express.
  • Pre-configured Apollo Client: The project comes with a preconfigured setup for Apollo Client.
  • Prisma: Develop your database with Prisma-v2.
  • Tooling: Out-of-the-box support for Adminer to view database.
  • Extensible: Simple and flexible data model โ€“ easy to adjust and extend.
  • Docker: Develop your application in containerized format. Write once, run anywhere.

A full-fledged React, Node and Apollo app

Requirements

Ensure you have node and docker installed on your machine.

Getting Started

# Clone (or fork) the repo
git clone https://github.com/shahanahmed86/accounts-server.git && cd accounts-server

# Fill out .env file with secrets (development only)
cp .env.example .env

# Install the deps
npm install

# dockerize your system then Run this command
npm run up

# run the server
npm run dev

postgresql

# docker to open bash
docker exec -it accounts-server_postgres-db_1 bas

# docker to open plsql
docker exec -it accounts-server_postgres-db_1 psql -U prisma -W dev
# flags
-it # for interactive
-U # for username
-W # database

# postgresql terminal commands list

redis commands

docker exec -it accounts-server_cache_1 redis-cli -a secret

# flags
-it # for interactive
redis-cli # to load redis command line interface
-a # cli password

# redis commands
scan 0
get "sess:lHoGnDimxq3Lz5j0cRWuEp3wivXtgSBB"
ttl "sess:lHoGnDimxq3Lz5j0cRWuEp3wivXtgSBB"
del "sess:lHoGnDimxq3Lz5j0cRWuEp3wivXtgSBB"

curl

curl localhost:4000/admin/logged-in \
  --cookie 'sid=s%3AhRKn3B_AOJjMsNkl8HnRQhC34LYwdwE2.ZHfP%2FXbh%2FNxJUqJSCr%2FUhAlE8JJ9jtgbQauGXLm7T78'

curl -X POST localhost:4000/admin/sign-in -H 'Content-Type: application/json' -v -d \
  '{"username":"admin","password":"admin"}'

curl -X POST localhost:4000/admin/sign-out \
  --cookie 'sid=s%3AhRKn3B_AOJjMsNkl8HnRQhC34LYwdwE2.ZHfP%2FXbh%2FNxJUqJSCr%2FUhAlE8JJ9jtgbQauGXLm7T78'

# flags
-v # verbose response
-d # body in JSON format
-X # method like put, post, get, delete
--cookie # obviously
-H # headers

github

# git cli for commit
git commit -m "test" --no-verify

# flags
-m # for message
--no-verify # will not perform tests

accounts-server's People

Contributors

shahanahmed86 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.