Skip to content

HayataTakagi/tcs-service

 
 

Repository files navigation

task-cabinet-server

Processing

  • [X] authorization system
  • [X] user system
  • [X] task system
  • [X] implement service (logic) => ref. https://github.com/MokkeMeguru/tcs-service
  • [X] connect to database
  • [ ] some code refinement
  • [ ] ssl connection using Let’s encrypt (Docker-Compose’s service…)

Installation

write `profiles.clj` from below code as it is.

※ database-url is jdbc:<db-program>://<db-name>/<relation-name>?user=<db’s username>&password=<db’s password> ref. docker-compose.yml

{:dev {:env {
             :database-url "jdbc:postgresql://localhost/dev"
             :clj-env "dev"
             :vapid-pub "<vapid-pub-key>"
             :vapid-private "<vapid-client-key>"}}
 :test {:env {
              :database-url "jdbc:postgresql://localhost/dev"
              :clj-env "test"
              :vapid-pub "<vapid-pub-key>"
              :vapid-private "<vapid-client-key>"}}}

Usage

Main Server

docker-compose build
docker-compose run --service-port repl
lein repl
=> (start)
# begin some log  and show the message ":initialized!"
# we running the server
=> (exit) # stop the server
git pull # for update
lein repl
# ...

accessing http://localhost:3000, You can see swagger view. Call any endpoint according to its description.

Push Server

docker-compose run --service-port webpush
yarn start

Project Structure

Spec

validation for the data in the whole service.

ex. user’s name length is more than 1 and less than 64.

Subproject: https://github.com/MokkeMeguru/tcs-spec

Handler

handler for the rest api. It will be the connection between the server and the client. rough service Implementation with Swagger-ui.

Subproject: https://github.com/MokkeMeguru/tcs-handler

DB

DB connection and migration settings for the server. We must NOT implement SQL or any attribution.

Subproject: https://github.com/MokkeMeguru/tcs-db

Service

Connect whole subproject. And implement LOGIC.

Subproject = Project = this repository.

Notification

NOTICE: this project was separated with this server. So Notification Server is another Project.

ref1. https://github.com/MokkeMeguru/tcc-notification-debug ref2. https://github.com/MokkeMeguru/tcs-notification

TODO: We will Implement Notification Server as Node.js script.

That You Think

License

Copyright © 2019 MokkeMeguru

This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version, with the GNU Classpath Exception which is available at https://www.gnu.org/software/classpath/license.html.

About

task-cabinet-server [will be merged all components]

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Clojure 99.4%
  • Other 0.6%