Closed grandeljay closed 3 years ago
For the web app (app.anonaddy.com) you can set it up locally by running:
git clone https://github.com/anonaddy/anonaddy.git
cd anonaddy
cp .env.example .env
If you are able to I would recommend setting up Laravel Homestead as your local dev environment for AnonAddy.
Buy if you just want to set it up more quickly without using a full dev environment then you will need to edit the following values in the .env
file:
APP_ENV=local
APP_DEBUG=true
DB_CONNECTION=sqlite
DB_DATABASE=/absolute/path/to/current/directory/anonaddy/storage/database.sqlite
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
MAIL_DRIVER=log
You may need to install appropriate PHP driver by running sudo apt install php8.0-sqlite3
If you are using Homestead then you can keep using mysql.
You do still need to have redis installed since it is used for throttling throughout the web app, so it might just be easier to
Then run the following:
composer install && npm install
npm run dev
php artisan key:generate
php artisan migrate
php artisan passport:install
Running passport:install
will output details about a new personal access client, e.g.
Encryption keys generated successfully.
Personal access client created successfully.
Client ID: 1
Client secret: MlVp37PNqtN9efBTw2wuenjMnMIlDuKBWK3GZQoJ
Password grant client created successfully.
Client ID: 2
Client secret: ZTvhZCRZMdKUvmwqSmNAfWzAoaRatVWgbCVN2cR2
You need to update your .env
file and add the details for the personal access client:
PASSPORT_PERSONAL_ACCESS_CLIENT_ID=client-id-value
PASSPORT_PERSONAL_ACCESS_CLIENT_SECRET=unhashed-client-secret-value
So I would enter:
PASSPORT_PERSONAL_ACCESS_CLIENT_ID=1
PASSPORT_PERSONAL_ACCESS_CLIENT_SECRET=MlVp37PNqtN9efBTw2wuenjMnMIlDuKBWK3GZQoJ
Now you should be able to run:
php artisan serve
Which will open http://127.0.0.1:8000 (or similar) in your browser where you can access the application.
If you run into any errors you can check the logs in storage/logs/
to see what the problem is.
Thanks for the detailed response, it was really helpful!
It seemed like I didn't have npm installed so I tried doing that with sudo apt-get install nodejs npm
but after running npm install & npm run dev
I got this error:
jay@Jay-Desktop:~/Projects/anonaddy$ npm install && npm run dev
loadDep:vuedraggable → 30 ▌ ╢██████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:vuedraggable → ca ▐ ╢██████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine cross-env@7.0.3: wanted: {"node":">=10.14","npm":">=6","yarn":">=1"} (current: {"node":"8.10.0","npm":"3.5.2"})
loadDep:vuedraggable → re ▐ ╢██████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:vuedraggable → ge ▄ ╢██████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:vuedraggable → ad ▄ ╢██████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm ERR! Linux 5.4.0-73-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/jay/Projects/anonaddy/npm-debug.log
I know it mentioned to open an issue at npm but when doing these kind of things I've had the experience that I've usually done something wrong rather than the software. Any more help is again very appreciated!
In case it's relevant I am using elementary OS (based on Ubuntu)
You might be better off installing node & npm using node version manager - https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04#option-3-%E2%80%94-installing-node-using-the-node-version-manager
If you check the self-hosting guide there are some relevant sections in there relating to setting up the app.
Hello,
I am attempting to make some suggestions to the anonaddy web UI. What do I have to do to set things up locally?
It looks like I have to run some composer or artisan command but I have rather little knowledge about web development.
Any help is appreciated, thanks.