nrocco / bookmarks

Personal zero-touch bookmarking app in the cloud, with full text search support.
Apache License 2.0
26 stars 6 forks source link

initial account #24

Closed robin521111 closed 3 years ago

robin521111 commented 3 years ago

what is the initial account of bookmark? bookmark:bookmark?

nrocco commented 3 years ago

Hi there! Can you clarify what it is you mean exactly?

robin521111 commented 3 years ago

image i am using docker now, but from login page, that i don't know what is the initial account, like above. but anyhow when i click on Login button, it will show HTTP ERROR 401.

nrocco commented 3 years ago

Got it. I realize that I never thought about how to create new accounts.

This application is also not build with more than 1 user in mind.

I will probably add some environment variables to the cli command (which you can pass via docker) to handle username/password.

robin521111 commented 3 years ago

in this case, why when i startup website comes login page firstly? should it be main page instead of it?

robin521111 commented 3 years ago

when i open the index page, it direct me to login, is that means the docker got bugs? i got hint from below code.

import axios from 'axios'
let client = axios.create({  baseURL: `/api`,  withCredentials: true})
client.interceptors.response.use((response) => response, (error) => {  if (error.response.status === 401) {    window.location.href = '/#/login'  }  return Promise.reject(error)})
export default client
nrocco commented 3 years ago

I just merged #25 which allows you so set a username/password via environment variables (if you use docker).

$ docker run -p 3000:3000 -e "BOOKMARKS_USERNAME=xxx" -e "BOOKMARKS_PASSWORD=yyy" nrocco/bookmarks

or if you use docker compose

...
services:
  bookmarks:
    image: nrocco/bookmarks
    environment:
      BOOKMARKS_USERNAME: xxx
      BOOKMARKS_PASSWORD: yyy
...

Check https://github.com/nrocco/bookmarks

I will close this issue now. Thanks for the feedback.