Example using albums post type, change for your post type.
/* src/api/albums/routes/01-import.js */
module.exports = {| const express = require('express'); | |
| const next = require('next'); | |
| const sm = require('sitemap'); | |
| const axios = require('axios'); | |
| const port = parseInt(process.env.PORT, 10) || 3000; | |
| const dev = process.env.NODE_ENV !== 'production'; | |
| const app = next({ dev }); | |
| const handle = app.getRequestHandler(); |
Objetivo del evento:
Metricas a juzgar:
Posibles ideas:
| /** | |
| * Using Operator Mono in Atom | |
| * | |
| * 1. Open up Atom Preferences. | |
| * 2. Click the “Open Config Folder” button. | |
| * 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up. | |
| * 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden! | |
| * 5. Tweak away. | |
| * | |
| * Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png): |
| <?php | |
| function my_rest_prepare_post( $data, $post, $request ) { | |
| $_data = $data->data; | |
| $thumbnail_id = get_post_thumbnail_id( $post->ID ); | |
| $thumbnail = wp_get_attachment_image_src( $thumbnail_id ); | |
| $_data['featured_image_thumbnail_url'] = $thumbnail[0]; | |
| $data->data = $_data; |
| 'use strict'; | |
| // simple express server | |
| var express = require('express'); | |
| var app = express(); | |
| var router = express.Router(); | |
| app.use(express.static('public')); | |
| app.get('/', function(req, res) { | |
| res.sendfile('./public/index.html'); |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
Tabletop.js is a fantastic, open-source JavaScript library that lets developers easily integrate data from Google Spreadsheets into their online projects. I've used it, even contributed a minor feature, and love it for prototyping. Non-programmers love being able to update a project via Google Spreadsheets' hyper-intuitive interface.
That said, I'm extraordinarily wary of using Tabletop in production. Instead, at the Wall Street Journal, we use a bit of middleware to "prune" our Google Spreadsheets-based data and then cache it on our own servers. A few brief reasons: