-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: single top level dev .env file and quicker quickstart #1021
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use a single top level .env flle to set all dev env vars. - remove old FAUNA logic from pinpin so we don't have to set the DATABASE var any more. - add top level `npm start` task to run the api and the website, for a quicker quickstart. - Update README's License: (Apache-2.0 AND MIT) Signed-off-by: Oli Evans <[email protected]>
one command to bind them ❯ npm start 16:02:01
> [email protected] start
> npm-run-all --print-label -p web api
[web]
[web] > [email protected] web
[web] > npm start -w packages/website
[web]
[api]
[api] > [email protected] api
[api] > npm start -w packages/api
[api]
[web]
[web] > @web3-storage/[email protected] start
[web] > env-cmd -f ../../.env next dev -p 4000
[web]
[api]
[api] > @web3-storage/[email protected] start
[api] > npm-run-all -p cluster:start pg:start -s miniflare
[api]
[web] ready - started server on 0.0.0.0:4000, url: http://localhost:4000
[web] info - Loaded env from /Users/oli/Code/web3-storage/web3.storage/packages/website/.env.local
[web] info - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
[api]
[api] > @web3-storage/[email protected] cluster:start
[api] > web3-storage-tools cluster --start
[api]
[api]
[api] > @web3-storage/[email protected] pg:start
[api] > cd ../db && npm start
[api]
[api]
[api] > @web3-storage/[email protected] start
[api] > node scripts/cli.js db --start --project web3-storage
[api]
[web] Defining routes from exportPathMap
[web] event - compiled successfully
[api]
[api] > @web3-storage/[email protected] miniflare
[api] > miniflare --env ../../.env --watch
[api]
[api]
[api] > @web3-storage/[email protected] build
[api] > node scripts/cli.js build
[api]
[api] ▲ [WARNING] Non-relative path "packages/blob/src/lib.js" is not allowed when "baseUrl" is not set (did you forget a leading "./"?)
[api]
[api] ../../node_modules/ipfs-car/node_modules/@web-std/blob/tsconfig.json:6:24:
[api] 6 │ "@web-std/blob": ["packages/blob/src/lib.js"]
[api] ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~
[api]
[api] [mf:inf] Build succeeded
[api] [mf:inf] Worker reloaded! (2.15MiB)
[api] [mf:wrn] Worker's uncompressed size exceeds the 1MiB limit! Note that your worker will be compressed during upload so you may still be able to deploy it.
[api] [mf:inf] Listening on :8787
[api] [mf:inf] - http://127.0.0.1:8787
[api] [mf:inf] - http://192.168.1.26:8787 |
just assume that the thing is running if its port is reachable and skip trying to start it. this allows us to kill and re-start our top level `npm start` without error. License: (Apache-2.0 AND MIT) Signed-off-by: Oli Evans <[email protected]>
cron pins still blends
|
pinpin still blends ❯ DEBUG="*" npm run start -w packages/pinpin
> @web3-storage/[email protected] start
> DEBUG_HIDE_DATE=true DEBUG=pinpin ./src/bin.js
pinpin 📡 Fetcing Pin Requests from DB +0ms
pinpin 📥 Processing 3 Pin Requests +35ms
pinpin 📌 bafkreiabltrd5zm73pvi7plq25pef3hm7jxhbi3kv4hapegrkfpkqtkbme 1/3 pinned on Pinata! Request created: 2022-02-22T15:25:12.062+00:00 +835ms
pinpin 📌 bafybeidmahqfk7jthbnaspso6skywa7fcqokswrxiw22nzjgnebqkqmrqy 2/3 pinned on Pinata! Request created: 2022-02-22T15:25:41.154+00:00 +17ms
pinpin 📌 bafybeidt4xhqaizqq2bvferllxcdrk7sfkry72etwbuacfkyqsq3bheody 3/3 pinned on Pinata! Request created: 2022-02-11T12:13:20.299+00:00 +11ms
pinpin 📡 Deleting 3 processed Pin Requests +0ms
pinpin 🎉 Done! Pinned 3 of 3 +14ms
pinpin 📡 Fetcing Pin Requests from DB +1ms
pinpin 📥 Processing 0 Pin Requests +10ms
pinpin 📡 Deleting 0 processed Pin Requests +0ms
pinpin 🎉 Done! Pinned 0 of 0 +11ms
pinpin Waiting 10s before checking for new Pin Requests +0ms
pinpin 📡 Fetcing Pin Requests from DB +10s
pinpin 📥 Processing 0 Pin Requests +11ms
pinpin 📡 Deleting 0 processed Pin Requests +0ms
pinpin 🎉 Done! Pinned 0 of 0 +10ms
pinpin Waiting 10s before checking for new Pin Requests +10s |
License: (Apache-2.0 AND MIT) Signed-off-by: Oli Evans <[email protected]>
hugomrdias
approved these changes
Feb 24, 2022
hugomrdias
approved these changes
Feb 24, 2022
vasco-santos
approved these changes
Feb 24, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ❤️
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use a single top level .env flle to set all dev env vars. With this PR getting started with the api and website is just
and you'll be off to the races with the api and website 🏇 💨 ✨
This PR includes:
npm start
task to run the api and the website, for a quicker quickstart.TODO:
License: (Apache-2.0 AND MIT)
Signed-off-by: Oli Evans [email protected]