file: server.js
const express = require('express');
const express = require('express');
const app = express();
const app = express();
app.use(express.static(__dirname + '/public'));
app.use(express.static(__dirname + '/public'));
app.listen(3000, function () {
app.listen(3000, function () {
console.log('server on port 3000');
console.log('server on port 3000');
});
});
file: index.jsx
import React,{Component} from 'react' import {render} from 'react-dom';
class Prueba extends Component{ render(){ <h1>Plantilla React</h1> }} render(< Prueba/>,document.getElementById('app'));