Based off of: http://docs.sequelizejs.com/en/1.7.0/articles/express/
Create and initialize your a directory for your Express application.
$ mkdir sequelize-demo
openapi: 3.0.0 | |
info: | |
title: Sample REST API for MCP | |
version: 1.0.0 | |
description: Example API that can be wrapped as an MCP server | |
servers: | |
- url: https://api.example.com/v1 | |
paths: |
{ | |
"name": "Replit Stable Environment", | |
"image": "mcr.microsoft.com/devcontainers/typescript-node:18", | |
"features": { | |
"ghcr.io/devcontainers/features/node:1": { | |
"version": "18" | |
}, | |
"ghcr.io/devcontainers/features/git:1": {} | |
}, | |
"customizations": { |
{ | |
"rules": { | |
"typescript": { | |
"noImplicitAny": true, | |
"strictNullChecks": true, | |
"noUnusedLocals": true, | |
"noUnusedParameters": true | |
}, | |
"formatting": { | |
"singleQuote": true, |
Based off of: http://docs.sequelizejs.com/en/1.7.0/articles/express/
Create and initialize your a directory for your Express application.
$ mkdir sequelize-demo
class Button extends React.Component{ | |
handleClick = () => { | |
this.props.onClickFunc(this.props.increment); | |
} | |
render(){ | |
return( | |
<button onClick={this.handleClick}>+{this.props.increment}</button> | |
) | |
} | |
} |
var _ = require('lodash'); | |
var statusObj = { | |
"01": ["a","b"], | |
"03": ["c","d"], | |
"04": ["e","c"] | |
}; | |
var myItem = _.findKey(statusObj, (item) => (item.indexOf("a") !== -1)); |
import React from "react"; | |
import { render } from "react-dom"; | |
const ParentComponent = React.createClass({ | |
getDefaultProps: function() { | |
console.log("ParentComponent - getDefaultProps"); | |
}, | |
getInitialState: function() { | |
console.log("ParentComponent - getInitialState"); | |
return { text: "" }; |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |