chadfurman / rpg-boilerplate Goto Github PK
View Code? Open in Web Editor NEWRelay (React), Postgres, and Graphile (GraphQL): A Modern Frontend and API Boilerplate
Relay (React), Postgres, and Graphile (GraphQL): A Modern Frontend and API Boilerplate
@benjie when you re-work a migration in sqitch, it keeps its original name and yet gets added to the end of the sqitch.plan -- I'm not convinced that the numeric prefix on the migrations is appropriate.
Prefixing the migrations with their type allows cleaner organization of the deploy folder. Inside the migrations there are also dependencies (albeit not all of them) outlined at the top of the files.
The exact order of the existing migrations is less important to someone wanting to make changes than having the files grouped nicely by their type (and also easily re-workable)
I'm going to change the migrations back, unless you have a compelling reason why they should be prefixed?
I've inserted a couple of tables to the public and want to use it in the api.
Related to this It sould be possible as simple as
May be an array for multiple schemas.
app.use(postgraphile(pgConnectionString, [pgSchemas, pgSchemasPublic], pgOptions))
but it does not work for me.
How can I use the public schema in this case?
`import express from 'express'
import postgraphile from 'postgraphile'
const app = express()
const pgConnectionString = process.env.DB_URI
const pgSchemas = process.env.POSTGRAPHILE_SCHEMAS.split(',')
const pgSchemasGramm = process.env.POSTGRAPHILE_SCHEMAS_PUBLIC.split(',')
const pgOptions = JSON.parse(process.env.POSTGRAPHILE_OPTIONS)
app.use(postgraphile(pgConnectionString, [pgSchemas, pgSchemasPublic], pgOptions))
app.listen(3000, '0.0.0.0', function () {
console.info('NODE_ENV: ' + process.env.NODE_ENV)
console.info('Postgraphile API started.\n')
})`
Right now, the SSR server is quite broken. Relay does not fire queries in the backend. This causes the frontend to flash a background image (#23) and then show content. On other sites, this renders as a progress bar (depending on how you change App.js etc)
Ultimately, the SSR server is the one responsible for displaying the content correctly. Additional improvements to page rendering can be achieved in another ticket by separating the header from the routing layer in the private / public templates. At that point, the SSR server would render everything and show it to the client, who would then only make small network requests, using the pre-rendered relay query (or environment?) cache...
from @benjie 8b54ee8#commitcomment-24551011
I recommend considering adding engines: { yarn: ">= 1.0.2", node: ">=4" } to the package.json; yarn for stable workspaces support (it was a bit flakey in 1.0.1 and below) and node because it's the min version for PostGraphile.
Don't forget to update the readme.
Add better metatags on rendered template. Especially once we start adding in OAuth etc -- getting social media references and more in the template is great, as is a description field, etc.
I'm working now to make it run on aws ecs and I have some troubles to mount volumes to containers
Why do we need to copy folders(Dockerfile) to the Image build
COPY . /opt/app COPY . /opt/frontend
and also mount volumes from yml
volumes: - ./frontend/.:/opt/frontend - /opt/frontend/node_modules volumes: - ./api/.:/opt/app - /opt/app/node_modules
also we copy api and all files and next api/node_modules, is it right?
For me it's looks redundant.
Without a user directive, the container apps run as root
from @benjie 8b54ee8#commitcomment-24550962
You can move this to a .yarnrc file so that no-one has to run it manually; see:
https://github.com/graphile/graphile-build/blob/master/.yarnrc
(Also I'm not sure if it's needed any more?)
Things are out of date and are causing problems:
warning "[email protected]" has incorrect peer dependency "babel-eslint@^7.2.3".
warning "[email protected]" has unmet peer dependency "eslint-plugin-babel@^4.1.1".
warning "[email protected]" has unmet peer dependency "[email protected]".
warning "[email protected]" has incorrect peer dependency "lodash@^4.17.0".
warning "[email protected]" has incorrect peer dependency "babel-runtime@^6.23.0".
warning "[email protected]" has incorrect peer dependency "ajv@>=4.10.0".
warning "[email protected]" has incorrect peer dependency "babel-eslint@^7.2.3".
warning "[email protected]" has incorrect peer dependency "eslint-plugin-jsx-a11y@^5.1.1".
warning "[email protected]" has unmet peer dependency "node-sass@^4.0.0".
warning "[email protected]" has incorrect peer dependency "[email protected] - 3.x".
warning "[email protected]" has incorrect peer dependency "eslint@^2.0.0 || ^3.0.0".
warning "[email protected]" has incorrect peer dependency "ajv@>=5.0.0".
warning "[email protected]" has incorrect peer dependency "graphql@>=0.9 <1".
warning "[email protected]" has incorrect peer dependency "pg@>=6 <7".
warning "[email protected]" has incorrect peer dependency "graphql@>=0.9 <1".
warning "[email protected]" has incorrect peer dependency "graphql@^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0".
warning "[email protected]" has incorrect peer dependency "graphql@>=0.4.0".
There should be a command to allow you to quickly create a table, function, schema, type, component, mutation, or route.
any migration file lists out other migrations and lets you check off depencies (similar to yarn upgrade-interactive), and then adds a migration of the form _<_optional> to the plan
Components generate the folder, the js file (along with a basic component boilerplate), the css file, and a basic Jest snapshot test
routes generate the route file, optionally add the file to routes.js, generate the view file similar to the component, and prompt for a root query for the route (or generating a commented out root query example and mentioning that the user must change it)
Generating a mutation creates the file in shared/relay/mutations
Webpack is now restarting, but something is causing it to restart constantly.
Some work is done already in the webpack config, but more is needed.
https://webpack.js.org/guides/code-splitting/
https://gist.github.com/bcallaars/67044de1675c677c0babc0665c50e661
basically the chunk.js file is the loader
and wait until the chunk is loaded and then displays it
but you define in the routeOne that it is a webpack chunk
This is one of a couple of projects in the community so far, and I think we should collect them here:
I know that we can do cd db && docker exec -it 742ea7492eb1 /bin/sh
but how for example we can connect IDE?
[08001] Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
742ea7492eb1 rpgboilerplate_db "docker-entrypoint.sā¦" 4 minutes ago Up 4 minutes 0.0.0.0:8001->5432/tcp rpgboilerplate_db_1
ports:
- '8001:5432'
I'm trying to run this project on ECS.
My steps
1 Cluster created ( Registered container instances 5? do we need 4 or 5)
2 Created repositories for api, frontend, db
3 Builded 3 images from individual folder cd api && docker build -t the_api .
4 docker push :latest
I'm here for now
Can any one help with following questions
Do we need to build nginx image and upload it to ECS?
How to start all tasks on server? (Like as usual through the Task Definition?)
Any related AWS/ECS multiple containers tutorials appreciated (I'm personally lost)
Having followed the steps in repo readme, when trying to deploy the sqitch database i get:
> cd rpg-boilerplate/db && sqitch deploy
Adding registry tables to db:pg://postgres:@localhost:8001/localdb
2018-02-26 03:42:47.209 GMT [57365] FATAL: --username requires a value
"/usr/local/bin/postgres" unexpectedly returned exit value 1
What am i missing?
BG image is only rendered while loading in everything else. App.js in general needs to change the way that image is loaded in. There should be classes, not inline CSS...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ššš
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ā¤ļø Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.