git ssb

0+

Rômulo Alves / plainbudget-next



Commit d43e73c547b54ad1b9f250da0e06562553fdd203

Upgrades to now v2

Rômulo Alves committed on 12/1/2018, 1:27:58 PM
Parent: f20766fcd63c17fd9526329e92ea3e92f42b26ac

Files changed

next.config.jschanged
now.jsonchanged
package-lock.jsonchanged
package.jsonchanged
pages/_app.jschanged
pages/_document.jschanged
.dockerignoredeleted
.nowignoreadded
Dockerfiledeleted
.well-known/datadded
server.jsdeleted
next.config.jsView
@@ -1,3 +1,1 @@
1-const withOffline = require('next-offline');
2-
3-module.exports = withOffline();
1 +module.exports = {};
now.jsonView
@@ -1,10 +1,28 @@
11 {
2 + "version": 2,
23 "name": "plainbudget",
3- "type": "docker",
4- "features": {
5- "cloud": "v2"
6- },
74 "alias": [
85 "plainbudget.now.sh"
6 + ],
7 + "env": {
8 + "NODE_ENV": "production"
9 + },
10 + "builds": [
11 + { "src": "next.config.js", "use": "@now/next" },
12 + { "src": ".well-known/*", "use": "@now/static" }
13 + ],
14 + "routes": [
15 + {
16 + "src": "/.well-known/(.*)",
17 + "dest": "/.well-known/$1",
18 + "headers": {
19 + "content-type": "text/plain",
20 + "content-disposition": "inline; filename=\"$1\""
21 + }
22 + },
23 + {
24 + "src": "/(.*)",
25 + "dest": "/$1"
26 + }
927 ]
1028 }
package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 259316 bytes
New file size: 221841 bytes
package.jsonView
@@ -1,31 +1,32 @@
11 {
22 "name": "plainbudget-next",
33 "version": "1.0.0",
4- "description": "",
54 "main": "index.js",
65 "scripts": {
7- "dev": "IS_DEVELOPMENT=true node server.js",
6 + "dev": "next",
87 "build": "next build",
9- "start": "node server.js"
8 + "start": "next start",
9 + "export": "npm run build && next export"
1010 },
1111 "repository": {
1212 "type": "git",
1313 "url": "git+https://github.com/romuloalves/plainbudget-next.git"
1414 },
15- "author": "",
16- "license": "ISC",
15 + "author": {
16 + "name": "Rômulo Alves",
17 + "email": "me@romuloalv.es",
18 + "url": "https://romuloalv.es"
19 + },
20 + "license": "MIT",
1721 "bugs": {
1822 "url": "https://github.com/romuloalves/plainbudget-next/issues"
1923 },
2024 "homepage": "https://github.com/romuloalves/plainbudget-next#readme",
2125 "dependencies": {
22- "compression": "1.7.3",
23- "express": "4.16.3",
24- "next": "6.1.1",
25- "next-offline": "2.11.0",
26 + "next": "^7.0.2",
2627 "plainbudget": "1.0.0",
2728 "prop-types": "15.6.2",
28- "react": "16.4.2",
29- "react-dom": "16.4.2"
29 + "react": "^16.6.3",
30 + "react-dom": "^16.6.3"
3031 }
3132 }
pages/_app.jsView
@@ -1,5 +1,6 @@
11 import App, { Container } from 'next/app';
2 +import Head from 'next/head';
23 import React from 'react';
34
45 import { isMobile } from '../utils/mobile';
56
@@ -23,8 +24,11 @@
2324 const { Component, pageProps } = this.props;
2425
2526 return (
2627 <Container>
28 + <Head>
29 + <title>plainbudget</title>
30 + </Head>
2731 <Component { ...pageProps } />
2832 </Container>
2933 );
3034 }
pages/_document.jsView
@@ -10,9 +10,8 @@
1010 render() {
1111 return (
1212 <html lang="en">
1313 <Head>
14- <title>plainbudget</title>
1514 <meta name="viewport" content="initial-scale=1.0, width=device-width" />
1615 <link rel="manifest" href="/static/manifest.json" />
1716
1817 <meta name="mobile-web-app-capable" content="yes" />
.dockerignoreView
@@ -1,8 +1,0 @@
1-*
2-!components/
3-!pages/
4-!utils/
5-!static/
6-!next.config.js
7-!server.js
8-!package*.json
.nowignoreView
@@ -1,0 +1,2 @@
1 +.next/
2 +README.md
DockerfileView
@@ -1,13 +1,0 @@
1-FROM mhart/alpine-node:10 as base
2-WORKDIR /usr/src
3-COPY package*.json /usr/src/
4-RUN npm ci
5-COPY . .
6-RUN npm run build && npm install --production
7-
8-FROM mhart/alpine-node:base-10
9-WORKDIR /usr/src
10-ENV NODE_ENV="production"
11-COPY --from=base /usr/src .
12-EXPOSE 3000
13-CMD ["node", "server.js"]
.well-known/datView
@@ -1,0 +1,2 @@
1 +dat://352a5c015d2fcca2835f9476e63c7d6795e4a2581dc1d9c5cfd6b68b8707f0f4
2 +TTL=3600
server.jsView
@@ -1,33 +1,0 @@
1-const next = require('next');
2-const express = require('express');
3-const compression = require('compression');
4-const { join } = require('path');
5-
6-const dev = process.env.IS_DEVELOPMENT || false;
7-const port = process.env.PORT || 3000;
8-
9-const app = next({ dev });
10-const handle = app.getRequestHandler();
11-
12-app.prepare()
13- .then(function() {
14- const server = express();
15-
16- if (!dev) {
17- server.use(compression());
18- }
19-
20- server.get('/service-worker.js', function(request, response) {
21- const filePath = join(__dirname, '.next', 'service-worker.js');
22-
23- return app.serveStatic(request, response, filePath);
24- });
25-
26- server.get('*', function(request, response) {
27- return handle(request, response);
28- });
29-
30- server.listen(port, function() {
31- console.log(`> Ready on http://localhost:${port}`);
32- });
33- });

Built with git-ssb-web