Keep running golang project even if console closed

Vikram :

How to keep golang project running even if console (putty) is closed. I have REST API developed in golang and hosted on AWS and using putty to connect and run the project

following command are used to install and run the project ( myapi )

go install myapi

myapi

when I close putty it stops working.

Jacob Lisi :

You have a number of options to keep your process running. The easiest of which is to use the nohup command.

$ nohup myapi &

The above command should run your application and print the output to a file called nohup.out. This file will be located in the directory where you run the command. Another option is to use screen or tmux.

If you want to start running your project in a more production ready way, you should look into service managers like systemd.

Este artigo é coletado da Internet.

Se houver alguma infração, entre em [email protected] Delete.

editar em
0

deixe-me dizer algumas palavras

0comentários
loginDepois de participar da revisão

Artigos relacionados

Chrome timer extension - how to keep timer running even when extension is closed?

Keep threads alive even if console app exits

How to keep ngrok running even when signing off of a server

Moving files from a text file with python but the script has to keep running even if there is missing files

How can I keep a Console App open when all processes are running on separate threads in c#?

Maven JavaFx project compiles but running from console give "Missing JavaFX application class" error msg

Keep dialog form from unloading when closed

Embedded YouTube video keep playing on closed container

Running code at noon in Golang

Check if a process is closed/not running, then restart the application

Userform: Keep Running Total in Textbox

Where to keep Dockerfile's in a project?

Does ionic push notification work even if the app is closed or minimized?

VueJS and Keep-Alive: Why the console error?

JavaScript Keep Console Window Open in Visual Studio

Onerror running anyway even when no error

Pytest running very slow for project

PyQt keeps running after window has been closed

the loop is not working and the program just keep running

Keep Android Qt apps running in background

GCE won't keep my script running

Keep Application running after Closing Event in WPF

Twitter API: How to make query keep running?

Keep running batch loop after starting .exe

Issue running a defined function in the PyCharm Console

Running tests using NUnit3 Console

Running several instances of a console application with php

What is best git workflow to keep a forked project uptodate with upstream project?

Can I keep vector data even after out of scope

TOP lista

  1. 1

    R Shiny: use HTML em funções (como textInput, checkboxGroupInput)

  2. 2

    O Chromium e o Firefox exibem as cores de maneira diferente e não sei qual deles está fazendo certo

  3. 3

    Como assinar digitalmente um documento PDF com assinatura e texto visíveis usando Java

  4. 4

    R Folheto. Dados de pontos de grupo em células para resumir muitos pontos de dados

  5. 5

    Gerenciar recurso shake de Windows Aero com barra de título personalizado

  6. 6

    Como obter dados API adequados para o aplicativo angular?

  7. 7

    UITextView não está exibindo texto longo

  8. 8

    Por que meus intervalos de confiança de 95% da minha regressão multivariada estão sendo plotados como uma linha de loess?

  9. 9

    Acessando relatório de campanhas na AdMob usando a API do Adsense

  10. 10

    Usando o plug-in Platform.js do Google

  11. 11

    Como posso modificar esse algoritmo de linha de visada para aceitar raios que passam pelos cantos?

  12. 12

    Dependência circular de diálogo personalizado

  13. 13

    Coloque uma caixa de texto HTML em uma imagem em uma posição fixa para site para desktop e celular

  14. 14

    iOS: como adicionar sombra projetada e sombra de traço no UIView?

  15. 15

    Como usar a caixa de diálogo de seleção de nomes com VBA para enviar e-mail para mais de um destinatário?

  16. 16

    Tabela CSS: barra de rolagem para a primeira coluna e largura automática para a coluna restante

  17. 17

    How to create dynamic navigation menu select from database using Codeigniter?

  18. 18

    Converter valores de linha SQL em colunas

  19. 19

    ChartJS, várias linhas no rótulo do gráfico de barras

  20. 20

    用@StyleableRes注释的getStyledAttributes。禁止警告

  21. 21

    não é possível adicionar dependência para com.google.android.gms.tasks.OnSuccessListener

quentelabel

Arquivo