C:\Users\vovat\WebstormProjects\Blog\ServerBlog>git push heroku master
Enumerating objects: 16, done.
Counting objects: 100% (16/16), done.
Delta compression using up to 4 threads
Compressing objects: 100% (10/10), done.
Writing objects: 100% (16/16), 59.91 KiB | 2.85 MiB/s, done.
Total 16 (delta 1), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote: NODE_VERBOSE=false
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): unspecified
remote: engines.npm (package.json): unspecified (use default)
remote: engines.yarn (package.json): unspecified (use default)
remote:
remote: Resolving node version 10.x...
remote: Downloading and installing node 10.16.3...
remote: Using default npm version: 6.9.0
remote: Resolving yarn version 1.x...
remote: Downloading and installing yarn (1.17.3)...
remote: Installed yarn 1.17.3
remote:
remote: -----> Installing dependencies
remote: Installing node modules (yarn.lock)
remote: yarn install v1.17.3
remote: [1/4] Resolving packages...
remote: [2/4] Fetching packages...
remote: info fsevents@1.2.9: The platform "linux" is incompatible with this module.
remote: info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
remote: [3/4] Linking dependencies...
remote: [4/4] Building fresh packages...
remote: Done in 11.53s.
remote:
remote: -----> Build
remote: Running build (yarn)
remote: yarn run v1.17.3
remote: $ yarn babel-transform && yarn start
remote: $ babel src -d dist
remote: src/controllers/PostController.js -> dist/controllers/PostController.js
remote: src/index.js -> dist/index.js
remote: src/model/PostModel.js -> dist/model/PostModel.js
remote: $ node dist/index.js
remote: Node app is running at localhost:5000
import mongoose from 'mongoose';
import PostController from "./controllers/PostController";
import experss from "express";
import bodyParser from "body-parser";
const Post = new PostController();
const app = experss();
const connectionString = "some url";
app.set('port', (process.env.PORT || 5000));
mongoose.connect(connectionString, {
useNewUrlParser: true,
useUnifiedTopology: true
});
app.use(bodyParser.urlencoded({
extended: true
}));
app.use(bodyParser.json());
app.get('/', (req,res)=>{
res.send(`<h1>Started</h1>`)
})
app.post('/posts', Post.create);
app.get('/posts', Post.read);
app.put('/posts/:id', Post.update);
app.delete('/posts/:id', Post.delete);
app.listen(app.get('port'), function() {
console.log("Node app is running at localhost:" + app.get('port'))
})
Айфон мало держит заряд, разбираемся с проблемой вместе с AppLab
Пробовал добавить авторизацию c Facebook через Amazon Cognito в моем реакт приложении, конфиг моего Aws Amplify выглядит так:
Доброе время сутокПрошу помочь разобраться с реализацией замены строк в
Есть функция, которая добавляет данные в конец документаКак сделать так, что бы данные добавлялись в середину документа/в любое место